1
0
Fork 0
2022-untitled-game/code/src/engine/ui.c

17 lines
309 B
C
Raw Normal View History

2022-08-01 23:11:10 +00:00
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;