#pragma once #include "workspace.h" #include "rendering/view.h" namespace Donut { class UILayer { public: UILayer() = default; auto draw(const UIContext& ctx) -> View; private: 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; }; }