diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 3 | ||||
| -rw-r--r-- | include/administration_writer.hpp | 8 | ||||
| -rw-r--r-- | include/ui.hpp | 25 |
3 files changed, 34 insertions, 2 deletions
diff --git a/include/administration.hpp b/include/administration.hpp index 24248e2..9de2822 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -155,7 +155,7 @@ typedef struct s32 next_id; // Id increment shared across all objects that have an ID. s32 next_sequence_number; // Sequence number for generating invoice numbers. char path[MAX_LEN_PATH]; // Full path to save file of current administration file. - char program_version[10]; // Program version of exe that stored the save path file. + char program_version[10]; // Program version of exe that stored the save file. list_t contacts; list_t projects; @@ -174,6 +174,7 @@ void administration_destroy(); // General functions. // ======================= +administration* administation_get(); char* administration_file_path_get(); contact administration_company_info_get(); void administration_company_info_set(contact data); diff --git a/include/administration_writer.hpp b/include/administration_writer.hpp new file mode 100644 index 0000000..cf0220f --- /dev/null +++ b/include/administration_writer.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "administration.hpp" + +#define ADMIN_FILE_SETTINGS "brackets.xml" + +bool administration_writer_save_tax_brackets(); +bool administration_writer_save_cost_centers();
\ No newline at end of file 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(); |
