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

19 lines
323 B
C

#pragma once
enum {MAX_WIDGET_NAME_LENGTH = 64};
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;