Styles - JamJar00/JUI GitHub Wiki
Styles describe how components should be drawn on screen; they specify borders and backgrounds.
Usage
style_t style = (style_t){ STYLE_FULL_BORDER, BLACK, DARK_GREY }
button_create(component, style, inner_component, callback);
Predefined Styles
NO_STYLE is a blank style.
ICONMENU_BUTTON_STYLE is the built in style for buttons in Icon Menus and will draw a grey border around the button with no background.
LISTVIEW_BUTTON_STYLE is the built in style for buttons in List Views and will draw grey top and bottom borders with no background.
GRIDVIEW_BUTTON_STYLE is the built in style for buttons in Grid Views and will draw a grey border with around the button with no background.
Reference
typedef struct {
uint8_t flags;
uint16_t background_color;
uint16_t border_color;
} style_t;
flags holds a number of predefined options that can be combined together using the boolean operators:
STYLE_NONEdisables the style.STYLE_BACKGROUNDenables drawing of a background.STYLE_TOP_BORDERenables drawing of the top border.STYLE_BOTTOM_BORDERenables drawing of the bottom border.STYLE_LEFT_BORDERenables drawing of the left border.STYLE_RIGHT_BORDERenables drawing of the right border.STYLE_FULL_BORDERenables all borders.
style_draw draws the specified style in the given rectangle.