#define UI_TEXTBOX_MULTILINE 0x1
#define UI_TEXTBOX_WRAP 0x2
#define UI_TEXTBOX_AUTOFOCUS 0x4
+
+#define UI_MODAL_OK 0x1
+#define UI_MODAL_YES 0x2
+#define UI_MODAL_NO 0x4
+#define UI_MODAL_CANCEL 0x8
+
#define UI_MOUSE_LEFT (SDL_BUTTON(SDL_BUTTON_LEFT))
#define UI_MOUSE_RIGHT (SDL_BUTTON(SDL_BUTTON_RIGHT))
#define UI_MOUSE_MIDDLE (SDL_BUTTON(SDL_BUTTON_MIDDLE))
+
+
struct{
struct ui_vert *vertex_buffer;
u16 *indice_buffer;
enum ui_control_type{
k_ui_control_none,
k_ui_control_textbox,
- k_ui_control_dropdown
+ k_ui_control_dropdown,
+ k_ui_control_modal
}
focused_control_type;
ui_rect rect;
}
dropdown;
+
+ struct ui_modal{
+ const char *message;
+ u32 options;
+
+ struct ui_modal_callbacks{
+ void (*close)(u32);
+ }
+ callbacks;
+ };
};
GLuint tex_glyphs, vao, vbo, ebo;