Core - ui_core( )
Can be used for storing all GUI elements. Allows for focusing widgets and easy widget management
Functions:
- add( widget, widget, ... )
- render( )
Attributes:
- [content]
Table of all widgets contained within the panel
Panels - new_panel( x, y, width, height, [col] )
Functions:
- add( widget, widget, ... )
Attributes:
-
[content]
Table of all widgets contained within the panel
-
[col]
Background color of the panel
-
[border]
Color of the border (false for no border)
-
[moveable]
Decides if the panel can be moved
-
[resizable]
Decides if the panel can be resized
-
[locked]
Toggles if panel can be resized/moved
-
[min_width]
Minimum panel width
-
[min_height]
Minimum panel height
- [title]
Name to be displayed
Sliders - new_slider( x, y, width, min, max, default, [col] )
Attributes:
-
[col]
Color of slider notch
-
[_min]
Minimum value slider can be set to
-
[_max]
Maximum value slider can be set to
-
[_range]
Range between minimum and maximum value (max - min)
- [_value]
Value slider is currently set to
Checkboxes - new_checkbox( x, y, [col], [toggled?] )
Attributes:
Buttons - new_button( x, y, width, height, [sprite], [col], [rounded?], [callback] )
Attributes:
-
[col]
Background color of button
-
[sprite]
Image displayed on button
-
[rounded]
Enable rounded corners
- [callback]
Function to call when pressed