Jump to content

[REL] Custom GUI Widget System


AriosJentu

Recommended Posts

Update: Added grid lists. They are called Table Views. Now you can just create them and select items, sorting now is not available. It will be added in future updates.

g8kwLFI.png

- Fixed bug with scroll pane - in past it can contains contents only with maximal size, setted to default user's screen size

- Added 2 new triggers - when scrolling scrollpane, and when changing state of check box

- Fixed bug with unavailabled events when user cursor located on canvases of Buttons, ProgressBars, EditBoxes (all) and Check Boxes

- Fixed bug with scrolling on scroll pane, now functions setVerticalScrollPosition and setHorizontalScrollPosition works correct

- Added function getFrame for Labels - now you can put any widget on Label.

 

  • Like 2
Link to comment
1 hour ago, AriosJentu said:

Update: Added grid lists. They are called Table Views. Now you can just create them and select items, sorting now is not available. It will be added in future updates.

 

  Reveal hidden contents

g8kwLFI.png

 

- Fixed bug with scroll pane - in past it can contains contents only with maximal size, setted to default user's screen size

- Added 2 new triggers - when scrolling scrollpane, and when changing state of check box

- Fixed bug with unavailabled events when user cursor located on canvases of Buttons, ProgressBars, EditBoxes (all) and Check Boxes

- Fixed bug with scrolling on scroll pane, now functions setVerticalScrollPosition and setHorizontalScrollPosition works correct

- Added function getFrame for Labels - now you can put any widget on Label.

 

Good luck

Link to comment
30 minutes ago, DiGiTal said:

@AriosJentu


local Window = CustomWindow.create(50, 50, 200, 200, "")
Window:setTitle("Hello World")

for to use setTitle func, did i don't need to export ? like

cs=exports.nameOfRessource

then cs:createWindow?

No, it's no needed when you make all like in installation manual from Wiki.

Link to comment

Update - fixed bugs, added some new functions, and working on Custom Widgets GUI Editor.

- Added function to get string of image location for CustomButton.

- Added more widgets what you can use as parent. Before this update, in parent type you can put only variables of CustomWindow and CustomScrollPane widgets, now added more widgets - CustomButton, CustomProgressBar, CustomLabel, CustomComboBox (button element), CustomCheckBox (label element) and CustomTabPanel (current selected tab).

- For CustomComboBox now added function to get count of items, and get lua table of items (table of strings of item names). 

- For CustomComboBox now added function to remove all items in one function -  CustomComboBox:clear().

- Now Tooltip is a class, where added new methods - get and set showing timeout - CustomTooltip:setShowTime(seconds) and CustomTooltip:getShowTime().

- Fixed bug with removing line from TableView. Added function to fully clearing table view's lines: CustomTableView:clearLines().

- For editor added on-editing update of properties, and created drawing functions of elements.

1vwD6Dx.jpg

  • Like 1
  • Thanks 1
Link to comment

Updates: Fixed bug with removing last line in TableViews, now it's not crashing all TableViews.

- Fixed bug with enabling/disabling comboboxes, when its selector is opened. Now it closing in almost all situation (tested with enable/disable, click, moving and etc)

- Updated Examples page: added one new example with TableViews, where you can change window theme, and add/remove lines

  • Like 1
Link to comment
On 27/08/2018 at 04:47, AriosJentu said:

Updates: Fixed bug with removing last line in TableViews, now it's not crashing all TableViews.

- Fixed bug with enabling/disabling comboboxes, when its selector is opened. Now it closing in almost all situation (tested with enable/disable, click, moving and etc)

- Updated Examples page: added one new example with TableViews, where you can change window theme, and add/remove lines

Why its soooo hard to just install the script?.? I dont get anything from the wiki ..

Link to comment
9 hours ago, DiGiTal said:

Why its soooo hard to just install the script?.? I dont get anything from the wiki ..

Thats not too hard. I've put information on wiki on main page of resource (first link in "See Also" part), also I've created video-tutorial of installation with basic example.

 

Link to comment

Update: Done work on events of system:

- Now method addEvent returns modified function of event to call it for method removeEvent.

- Added method removeEvent for classes, argument of event function needs to be a function, what returns with addEvent.

- Now added method destroy for all classes to destroy Custom Widget. Yay :D

- Added methods to get/set text for Custom Tooltip.

- For Tabbed Panels added method to clear all tabs.

 

Edited by AriosJentu
  • Like 2
Link to comment

Update: fixed bugs with combo boxes and edit boxes:

- Fixed bug with edit box, when you click on it, it's focus was blur.

- Fixed bug with combo boxes, when clear combo box, it clears only every second item

- Fixed bug with combo boxes, when removing item, size of opened combobox doesn't changing

  • Like 1
Link to comment

Update: Windows can be resizable by user

- Added function getCWType to get type of object of Custom Widget. If object is not connected with CustomWidgets, it returns nil. Function returns class parent, and can be used as generator of new object.

- Added blocks on window to resize it with mouse.

- Added functions to set minimal and maximal sizes of window.

- Now all objects and classes has string name of self. Parameter calls ClassName. For example: CustomWindow.ClassName = "CustomWindow".

Edited by AriosJentu
Link to comment
23 hours ago, iMr.WiFi..! said:

+ Problem: When you use customCheckBox.create with true in Relative it doesn't show at all.

Thanks for reporting) Give me please an example of code, where it won't works) About Fonts, I this l think, I'll add default fonts, but now I'm working on Custom Edits, created without using standart GUIs, and one trouble of them - I can't find methods to calculate blocks spacing in multiline. That's reason, why I do not recommend to change fonts for new future custom edit boxes. But for all another widgets, you can set standart MTA SA  fonts by default, using basic MTA labels method setFont. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...