From 359422c97cce93bbb27051f9df3efb45bd0b9052 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 23 Aug 2025 11:18:44 +0200 Subject: settings file writing --- include/ui.hpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'include/ui.hpp') 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(); -- cgit v1.2.3-70-g09d2