hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_layer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_layer.h')
-rw-r--r--src/ui/ui_layer.h42
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;
};
}