[Release] DecUI: A declarative approach to UI development

NewK

  • VC:MP Beta Tester
  • Posts: 176
[Release] DecUI: A declarative approach to UI development
«  »
DecUI

After having to deal with some of the issues and annoyances that come along with the experience of building a GUI in VCMP, I decided to create DecUI (declarative UI), a library to address the main pain points related to GUI development in VCMP and make it easier and more readable overall.

This library provides an abstraction over the existing GUIElements and allows you to create them and relate them to each other in a declarative manner instead of using the default imperative based VCMP approach. You can see a comparison here.

In addition to providing an abstraction layer for creating GUIElements, this library also provides many new components like:


There's also many new features that have been added to already existing GUIElements like GUIElements ID's, a hide()/show() function, an autoResize property for the GUIWindow and GUICanvas which will automatically resize your windows and canvas according to their contents, a fadeIn()/fadeOut() function and many more new properties which can be seen here. All the existing properties and functions like .Size, .Position and the others mentioned on the VCMP wiki are still applicable when using this library so they will still work.

Downloading and getting started


The documentation is still incomplete but it's a good starting point for now.

Any questions feel free to ask

umar4911

  • Sr. Member
  • Creating own server!
  • Posts: 472
I am gamer, programmer and hacker. Try to find me!
xD

MatheuS

  • Wiki Contributor
  • LBR | Co-Leader & Brasil Real RPG | Developer
  • Posts: 445
Code: [Select]
if( !sucess ) tryAgain();

ℛḝξ☂

  • Jr. Member
  • Posts: 94
I may be a slow walker but I am always walking.

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 917

NewK

  • VC:MP Beta Tester
  • Posts: 176
[Release] Re: DecUI: A declarative approach to UI development
« Reply #5,  »
I made a visual studio code extension for the DecUI library that  will assist you when using the library. It has autocompletions and snippets for all the GUIElements and components currently present in the library. Here's a demo of it in action:



If you're not using visual studio code, I highly recommend it. Download it and make sure to install the squirrel extension first before installing the DecUI extension or else it won't work. After installing the squirrel extension, you can get the DecUI extension here. Click the "clone or download" button and click on "Download ZIP". After downloading, extract the folder inside the .zip file to your visual studio code extensions folder ( %USERPROFILE%\.vscode\extensions ). After extracting the folder, restart visual studio code (if you have it open) and that's it.

DarkRaZoR^

  • Full Member
  • VC:MP Battlefield Head Developer/KF Leader
  • Posts: 208
[Release] Re: DecUI: A declarative approach to UI development
« Reply #6,  »
Quote from NewK on June 28th, 01:08 AM
I made a visual studio code extension for the DecUI library that  will assist you when using the library. It has autocompletions and snippets for all the GUIElements and components currently present in the library. Here's a demo of it in action:



If you're not using visual studio code, I highly recommend it. Download it and make sure to install the squirrel extension first before installing the DecUI extension or else it won't work. After installing the squirrel extension, you can get the DecUI extension here. Click the "clone or download" button and click on "Download ZIP". After downloading, extract the folder inside the .zip file to your visual studio code extensions folder ( %USERPROFILE%\.vscode\extensions ). After extracting the folder, restart visual studio code (if you have it open) and that's it.
Now that's rad. Awesome work, dude.