17 lines
309 B
C
17 lines
309 B
C
|
enum {MAX_WIDGET_NAME_LENGTH = 16};
|
||
|
enum {MAX_WIDGET_COUNT = 16};
|
||
|
|
||
|
typedef struct ui_widget {
|
||
|
char label[MAX_WIDGET_NAME_LENGTH];
|
||
|
int x;
|
||
|
int y;
|
||
|
void (*action)(void);
|
||
|
} ui_widget_t;
|
||
|
|
||
|
typedef struct ui_menu {
|
||
|
ui_widget_t widgets[MAX_WIDGET_COUNT];
|
||
|
size_t widget_count;
|
||
|
size_t active_index;
|
||
|
} ui_menu_t;
|
||
|
|