diff options
Diffstat (limited to 'include/ui.hpp')
| -rw-r--r-- | include/ui.hpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/include/ui.hpp b/include/ui.hpp index afa9665..ac3f3cc 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -1,5 +1,13 @@ #pragma once +#define STATUS_TEXT_LEN 64 +#define STATUS_DURATION 4.0f +#define STATUS_FLASH_INTERVAL 0.1f +#define STATUS_MAX_FLASHES 2 + +#define COLOR_ERROR IM_COL32(235, 64, 52, 255) +#define COLOR_DEFAULT IM_COL32(235, 255, 255, 255) + typedef enum { LIST, @@ -8,7 +16,22 @@ typedef enum VIEW, } view_state; -void ui_helper_draw_required_tag(); +typedef struct +{ + bool visible; + int flash_count; + int color; + char text[STATUS_TEXT_LEN]; + float time; +} ui_status; + +void ui_helper_draw_required_tag(); + +void ui_set_status_error(const char* txt); +void ui_set_status_ex(const char* txt, int color); +void ui_set_status(const char* txt); +ui_status ui_get_status(); +void ui_draw_status(); void ui_draw_main(); void ui_draw_contacts(); |
