AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
gui_widgets.h
Go to the documentation of this file.
1 
6 #ifndef GUI_WIDGETS_H
7 #define GUI_WIDGETS_H
8 
9 #include <stddef.h>
10 #include "gui_platform.h"
11 
19 int Gr_DrawButton(GrRect bounds, const char *label, int enabled);
20 
29 int Gr_DrawRadioButton(float x, float y, int selected, const char *label);
30 
40 int Gr_DrawTextBox(GrRect bounds, char *text, size_t cap, int active, const char *placeholder);
41 
49 void Gr_DrawTextInBox(GrRect bounds, const char *text, int font_size, GrColor color);
50 
61 int Gr_DrawCustomSwitch(float x, float y, float w, float h, int active, const char *label);
62 
71 int Gr_DrawSegmentedControl(GrRect bounds, const char *opts[], int count, int selected);
72 
83 int Gr_DrawCustomDropdown(GrRect bounds, const char *label, const char *items[], int count, int *selected, int *open);
84 
97 int Gr_DrawCustomDropdownScrollable(GrRect bounds, const char *label, const char *items[], int count, int *selected, int *open, int *scroll, int max_visible);
98 
99 #endif
100 
Platform-independent renderer and OS abstraction layer.
int Gr_DrawTextBox(GrRect bounds, char *text, size_t cap, int active, const char *placeholder)
Renders an interactive input text box.
Definition: gui_widgets.c:61
int Gr_DrawRadioButton(float x, float y, int selected, const char *label)
Renders a standard circular radio button with associated text label.
Definition: gui_widgets.c:39
int Gr_DrawButton(GrRect bounds, const char *label, int enabled)
Renders a custom clickable button.
Definition: gui_widgets.c:21
void Gr_DrawTextInBox(GrRect bounds, const char *text, int font_size, GrColor color)
Utility helper to draw text aligned within a bounding box.
Definition: gui_widgets.c:51
int Gr_DrawSegmentedControl(GrRect bounds, const char *opts[], int count, int selected)
Renders a segmented selector bar containing multiple text labels.
Definition: gui_widgets.c:121
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.
Definition: gui_widgets.c:141
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.
Definition: gui_widgets.c:178
int Gr_DrawCustomSwitch(float x, float y, float w, float h, int active, const char *label)
Draws a slide switch toggle.
Definition: gui_widgets.c:104
Abstract color representation using 8-bit red, green, blue, and alpha values.
Definition: gui_platform.h:15
Abstract rectangle bounding box in 2D coordinate space.
Definition: gui_platform.h:20