Pioneer
Loading...
Searching...
No Matches
SystemEditorViewport.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#pragma once
5
6#include "ViewportWindow.h"
7
8namespace Background {
9 class Container;
10}
11
12class StarSystem;
14
15namespace Editor {
16
17 class SystemEditor;
18
20 public:
23
25
26 SystemMapViewport *GetMap() { return m_map.get(); }
27
28 protected:
29 void OnUpdate(float deltaTime) override;
30 void OnRender(Graphics::Renderer *renderer) override;
31
32 void OnHandleInput(bool clicked, bool released, ImVec2 mousePos) override;
33
34 void OnDraw() override;
35 bool OnCloseRequested() override;
36
37 const char *GetWindowName() override { return "Viewport"; }
38
39 private:
40
41 void DrawTimelineControls();
42 bool DrawIcon(ImGuiID id, const ImVec2 &iconPos, const ImColor &color, const char *icon, const char *label = nullptr);
43
44 EditorApp *m_app;
45 SystemEditor *m_editor;
46
47 std::unique_ptr<SystemMapViewport> m_map;
48 std::unique_ptr<Background::Container> m_background;
49 };
50};
unsigned int ImGuiID
Definition: Modal.h:9
Definition: EditorApp.h:20
Definition: SystemEditorViewport.h:19
bool OnCloseRequested() override
Definition: SystemEditorViewport.cpp:53
~SystemEditorViewport()
Definition: SystemEditorViewport.cpp:43
const char * GetWindowName() override
Definition: SystemEditorViewport.h:37
void OnRender(Graphics::Renderer *renderer) override
Definition: SystemEditorViewport.cpp:65
void OnHandleInput(bool clicked, bool released, ImVec2 mousePos) override
Definition: SystemEditorViewport.cpp:70
void OnDraw() override
Definition: SystemEditorViewport.cpp:75
void SetSystem(RefCountedPtr< StarSystem > system)
Definition: SystemEditorViewport.cpp:47
void OnUpdate(float deltaTime) override
Definition: SystemEditorViewport.cpp:58
SystemMapViewport * GetMap()
Definition: SystemEditorViewport.h:26
Definition: SystemEditor.h:46
Definition: ViewportWindow.h:21
Definition: Renderer.h:45
Definition: RefCounted.h:36
Definition: StarSystem.h:28
Definition: SystemView.h:230
Definition: Background.cpp:62
Definition: ActionBinder.h:14