#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, EDIT, CREATE, VIEW, } view_state; typedef struct { bool visible; int flash_count; int color; char text[STATUS_TEXT_LEN]; float time; bool loading; } ui_status; void ui_helper_draw_required_tag(); void ui_set_status_loading(bool loading); 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(); void ui_draw_projects(); void ui_draw_invoices(); void ui_draw_settings(); void ui_draw_expenses(); void ui_setup_invoices(); void ui_setup_contacts(); void ui_setup_projects(); void ui_setup_settings(); void ui_setup_expenses(); void ui_destroy_invoices(); void ui_destroy_settings(); void ui_destroy_expenses(); // Custom imgui widgets. int TextInputWithAutocomplete(const char* label, const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count);