diff options
| author | hachem <im@hachem.wtf> | 2026-08-24 17:07:54 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-24 17:07:54 +0200 |
| commit | 5c8a5cd96ec369cdb5f61a31b4004c1f412cec09 (patch) | |
| tree | b7da1356a85b690d864f3f4d1b3772ba9f7c4777 /src/ui/ui_layer.h | |
| parent | b7ec681e34c68b97976508fa26f8d5f4916de459 (diff) | |
chore: cleanup shaders
Diffstat (limited to 'src/ui/ui_layer.h')
| -rw-r--r-- | src/ui/ui_layer.h | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/src/ui/ui_layer.h b/src/ui/ui_layer.h index 5032c05..62b4104 100644 --- a/src/ui/ui_layer.h +++ b/src/ui/ui_layer.h @@ -2,22 +2,48 @@ #include "workspace.h" #include "rendering/view.h" -#include "core/memory.h" - -#include <vector> namespace Donut { class UILayer { public: - UILayer(); + UILayer() = default; auto draw(const UIContext& ctx) -> View; private: - std::vector<Scope<Workspace>> m_workspaces; - int m_active = 0; - int m_landing = 0; - bool m_landed = false; + enum class Mode { Scene, Simulation }; + enum class Layout { Simulation, SceneEditing, Export }; + + auto draw_menu_bar(const UIContext& ctx) -> void; + auto build_layout(unsigned int dockspace_id) -> void; + auto apply_layout(Layout layout) -> void; + + auto panel_outliner(const UIContext& ctx) -> void; + auto panel_properties(const UIContext& ctx) -> void; + auto panel_black_hole(const UIContext& ctx) -> void; + auto panel_settings(const UIContext& ctx) -> void; + auto panel_export(const UIContext& ctx) -> void; + auto panel_stats(const UIContext& ctx) -> void; + + Mode m_mode = Mode::Simulation; + Layout m_layout = Layout::Simulation; + bool m_rebuild_layout = false; + bool m_first_frame = true; + + bool m_show_outliner = false; + bool m_show_properties = false; + bool m_show_black_hole = true; + bool m_show_settings = false; + bool m_show_export = false; + bool m_show_stats = true; + + int m_gizmo_op = 0; + + float m_ui_scale = 1.0f; + + bool m_exp_color = true, m_exp_redshift = false, m_exp_temperature = false, m_exp_impact = false; + int m_exp_resolution = 1, m_exp_format = 0; + int m_exp_written = 0; bool m_exp_reported = false; }; } |
