-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor_panels.cpp
More file actions
70 lines (62 loc) · 1.49 KB
/
editor_panels.cpp
File metadata and controls
70 lines (62 loc) · 1.49 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include "editor_panels.h"
#include "panels/console_panel.h"
#include "panels/content_browser_panel.h"
#include "panels/world_panel.h"
#include "panels/effects_panel.h"
#include "panels/material_panel.h"
#include "panels/inspector_panel.h"
#include "panels/panel.h"
#include "panels/profiler_panel.h"
#include "panels/project_browser_panel.h"
#include "panels/project_settings_panel.h"
#include "panels/scene_hierarchy_panel.h"
#include "panels/viewport_panel.h"
namespace CHEngine
{
void EditorPanels::Init()
{
Register<ViewportPanel>();
Register<SceneHierarchyPanel>();
Register<InspectorPanel>();
Register<ContentBrowserPanel>();
Register<ConsolePanel>();
Register<WorldPanel>();
Register<EffectsPanel>();
Register<MaterialPanel>();
Register<ProfilerPanel>();
Register<ProjectBrowserPanel>();
Register<ProjectSettingsPanel>();
}
void EditorPanels::OnUpdate(Timestep ts)
{
for (auto& panel : m_Panels)
{
panel->OnUpdate(ts);
}
}
void EditorPanels::OnImGuiRender(bool readOnly)
{
for (auto& panel : m_Panels)
{
if (panel->GetName() == "Project Browser")
{
continue;
}
panel->OnImGuiRender(readOnly);
}
}
void EditorPanels::OnEvent(Event& e)
{
for (auto& panel : m_Panels)
{
panel->OnEvent(e);
}
}
void EditorPanels::SetContext(const std::shared_ptr<Scene>& context)
{
for (auto& panel : m_Panels)
{
panel->SetContext(context);
}
}
} // namespace CHEngine