hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-04-01 19:52:33 +0200
committerhachem <im@hachem.wtf>2026-04-01 19:52:33 +0200
commit15b9b273247099ba0eac75a5769592bf7bcb89dc (patch)
tree0a12fe8fa1b6d622361f41445eb7d4fee6b3c06a /src/ui/ui.h
parent22f3bf683913451b38a3bdc3a7992022a0e805bf (diff)
feat: ui refactor of doom and despair
Diffstat (limited to 'src/ui/ui.h')
-rw-r--r--src/ui/ui.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 0dcb7e6..251a2b4 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -6,6 +6,7 @@
#include "ui/preferences.h"
#include "ui/profiler.h"
#include "ui/source_view.h"
+#include "ui/theme.h"
#include <cstdint>
#include <filesystem>
@@ -53,10 +54,17 @@ namespace Hsdbg
bool profiler = false;
bool macros = false;
- bool demo = false;
};
auto apply_style() -> void;
+
+ auto load_fonts() -> void;
+
+ auto load_selected_theme(bool seed_preferences) -> void;
+ auto seed_preferences_from_theme() -> void;
+ auto select_theme(const ThemeEntry& entry) -> void;
+ static auto themes_directory() -> std::filesystem::path;
+
static auto build_default_layout(uint32_t dockspace_id) -> void;
auto draw_command_palette(Debugger& debugger) -> void;
@@ -106,6 +114,14 @@ namespace Hsdbg
bool m_restyle_pending = false;
int m_preferences_tab = 0;
+ Theme m_theme;
+ std::vector<ThemeEntry> m_themes;
+ bool m_prefs_open_prev = false;
+
+ ImFont* m_font_ui = nullptr;
+ ImFont* m_font_strong = nullptr;
+ ImFont* m_font_mono = nullptr;
+
AnimatedImage m_mascot;
ImageRenderer m_image_renderer;
bool m_mascot_loaded = false;