Log In  

Cart #picogui_demo-1 | 2022-08-12 | Code ▽ | Embed ▽ | No License
5

Cart #picogui_ball_demo-1 | 2022-08-12 | Code ▽ | Embed ▽ | No License
5

Updated Release 1.1


About
Pico-GUI is an object based ui library useful for debugging games or creating development tools. This was made in just one day, and there may be some bugs or important missing features.

Currently the system is at 891 tokens. I'm not the best at crunching down token counts, so if someone manages to save more tokens, let me know and I'll probably update the main post with that version


Widgets
Widgets are any interactable UI element.
By default, Pico-GUI supports Panels (windows), Sliders, Buttons and Toggles.


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:

  • [col]
    Color of toggle when enabled

  • [toggle]
    Stores the state of the toggle

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

P#115165 2022-08-02 19:09 ( Edited 2022-08-12 05:24)

dang this is cool

P#115504 2022-08-09 13:26
:: DOJI13

i do not know how to use this :(

P#115521 2022-08-09 21:41 ( Edited 2022-08-09 21:42)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-08-15 04:31:28 | 0.008s | Q:21