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

19 lines
323 B
C
Raw Permalink Normal View History

2022-08-02 16:35:50 +00:00
#pragma once
enum {MAX_WIDGET_NAME_LENGTH = 64};
2022-08-01 23:11:10 +00:00
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;