blob: 62b41046c6aed36284c7239adf66960212724e97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#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;
};
}
|