|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
Implementations of modular, state-retaining GUI drawing widgets. More...
Macros | |
| #define | GR_WHITE ((GrColor){255,255,255,255}) |
Functions | |
| static GrColor | Gc (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Constructs a GrColor value. More... | |
| int | Gr_DrawButton (GrRect bounds, const char *label, int enabled) |
| Renders a custom clickable button. More... | |
| int | Gr_DrawRadioButton (float x, float y, int selected, const char *label) |
| Renders a standard circular radio button with associated text label. More... | |
| void | Gr_DrawTextInBox (GrRect bounds, const char *text, int font_size, GrColor color) |
| Utility helper to draw text aligned within a bounding box. More... | |
| int | Gr_DrawTextBox (GrRect bounds, char *text, size_t cap, int active, const char *placeholder) |
| Renders an interactive input text box. More... | |
| int | Gr_DrawCustomSwitch (float x, float y, float w, float h, int active, const char *label) |
| Draws a slide switch toggle. More... | |
| int | Gr_DrawSegmentedControl (GrRect bounds, const char *opts[], int count, int selected) |
| Renders a segmented selector bar containing multiple text labels. More... | |
| int | Gr_DrawCustomDropdown (GrRect bounds, const char *label, const char *items[], int count, int *selected, int *open) |
| Draws a custom drop-down menu selection modal. More... | |
| int | Gr_DrawCustomDropdownScrollable (GrRect bounds, const char *label, const char *items[], int count, int *selected, int *open, int *scroll, int max_visible) |
| Extended custom dropdown featuring scrollbars for long list selections. More... | |
Implementations of modular, state-retaining GUI drawing widgets.
| #define GR_WHITE ((GrColor){255,255,255,255}) |
|
static |
| int Gr_DrawButton | ( | GrRect | bounds, |
| const char * | label, | ||
| int | enabled | ||
| ) |
Renders a custom clickable button.
| bounds | Button position and size. |
| label | Text printed on the button. |
| enabled | 1 to allow clicks, 0 to draw grayed out and ignore input. |
| int Gr_DrawCustomDropdown | ( | GrRect | bounds, |
| const char * | label, | ||
| const char * | items[], | ||
| int | count, | ||
| int * | selected, | ||
| int * | open | ||
| ) |
Draws a custom drop-down menu selection modal.
| bounds | Outer selector box boundaries. |
| label | Display text of the active selection when closed. |
| items | Array of options to display when expanded. |
| count | Number of items in array. |
| selected | Pointer to selection index value (mutated in place). |
| open | Pointer to boolean toggle tracking expansion state (mutated in place). |
| int Gr_DrawCustomDropdownScrollable | ( | GrRect | bounds, |
| const char * | label, | ||
| const char * | items[], | ||
| int | count, | ||
| int * | selected, | ||
| int * | open, | ||
| int * | scroll, | ||
| int | max_visible | ||
| ) |
Extended custom dropdown featuring scrollbars for long list selections.
| bounds | Outer selector box boundaries. |
| label | Display text of the active selection when closed. |
| items | Array of options to display when expanded. |
| count | Number of items in array. |
| selected | Pointer to selection index value (mutated in place). |
| open | Pointer to boolean toggle tracking expansion state (mutated in place). |
| scroll | Pointer to scroll offset value (mutated in place). |
| max_visible | Maximum items to draw before triggering scrollbars. |
| int Gr_DrawCustomSwitch | ( | float | x, |
| float | y, | ||
| float | w, | ||
| float | h, | ||
| int | active, | ||
| const char * | label | ||
| ) |
Draws a slide switch toggle.
| x | Left coordinate. |
| y | Top coordinate. |
| w | Width. |
| h | Height. |
| active | 1 if switch is turned on, 0 if turned off. |
| label | Toggle description label. |
| int Gr_DrawRadioButton | ( | float | x, |
| float | y, | ||
| int | selected, | ||
| const char * | label | ||
| ) |
Renders a standard circular radio button with associated text label.
| x | Horizontal center coordinate. |
| y | Vertical center coordinate. |
| selected | 1 if active, 0 otherwise. |
| label | Text printed next to the radio button. |
| int Gr_DrawSegmentedControl | ( | GrRect | bounds, |
| const char * | opts[], | ||
| int | count, | ||
| int | selected | ||
| ) |
Renders a segmented selector bar containing multiple text labels.
| bounds | Segment container boundaries. |
| opts | Array of label strings representing selectable segments. |
| count | Number of options. |
| selected | Currently active selection index. |
| int Gr_DrawTextBox | ( | GrRect | bounds, |
| char * | text, | ||
| size_t | cap, | ||
| int | active, | ||
| const char * | placeholder | ||
| ) |
Renders an interactive input text box.
| bounds | Text box coordinates. |
| text | Buffer storing active characters (mutated in place). |
| cap | Maximum capacity of the text buffer. |
| active | 1 if text box has keyboard focus, 0 otherwise. |
| placeholder | Text displayed when the buffer is empty. |