You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON5-based (like Spinnery), since CSS is too heavy and there is an existing JSON5 parser bundled with LibGui (Jankson)
CSS-like selectors
Widgets can have a CSS-like style class, ID and a hierarchy of types (grid <- panel or just button for example)
Example of a style:
{button: {// Applies to all buttonstext_color: 0xFF0000},"button.run_button, label": {// Buttons with the class .run_button and all labelsbackground_color: 0xFF0000FF}}
All styles are stored as assets/<namespace>/libgui/stylesheet.json5 (replace libgui with the project name if this is moved to another project). They are loaded and stacked from all resource packs.
TODO:
For selecting things with classes, there needs to be some sort of a priority system for selectors (I'm thinking of widget ID > numbers of classes > index in type hierarchy as a simple priority system)
The text was updated successfully, but these errors were encountered:
Current plan:
grid <- panel
or justbutton
for example)Example of a style:
All styles are stored as
assets/<namespace>/libgui/stylesheet.json5
(replacelibgui
with the project name if this is moved to another project). They are loaded and stacked from all resource packs.TODO:
widget ID > numbers of classes > index in type hierarchy
as a simple priority system)The text was updated successfully, but these errors were encountered: