summaryrefslogtreecommitdiff
path: root/include/ui.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-08-23 11:18:44 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-08-23 11:18:44 +0200
commit359422c97cce93bbb27051f9df3efb45bd0b9052 (patch)
tree2e352bb852a25390d40d45e199f835d218ad497f /include/ui.hpp
parent8ea59863c5d13e68e080cf7612047ea4c655292c (diff)
settings file writing
Diffstat (limited to 'include/ui.hpp')
-rw-r--r--include/ui.hpp25
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();