Hymn to Beauty
C++ 3D Engine
SceneEditor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include "EntityEditor.hpp"
5#include "../ResourceSelector.hpp"
6
7class Entity;
8
9namespace GUI {
12 public:
15
17 void Show();
18
20
24 void SetScene(const std::string& path, std::string* scene);
25
27
30 bool IsVisible() const;
31
33
36 void SetVisible(bool visible);
37
39 void Save() const;
40
42
45 Json::Value GetSaveFileJson(std::string* filename) const;
46
48 bool entityPressed = false;
49
52
53 private:
54 void ShowEntity(Entity* entity);
55 Entity* draggedEntity = nullptr;
56
57 bool visible = false;
58
59 std::string path;
60 std::string* scene = nullptr;
61
62 char name[128];
63
64 ResourceSelector sceneSelector;
65};
66} // namespace GUI
Entity containing various components.
Definition: Entity.hpp:16
Used to edit an entity.
Definition: EntityEditor.hpp:33
Used to select a resource from the resource list.
Definition: ResourceSelector.hpp:7
Used to edit a scene.
Definition: SceneEditor.hpp:11
bool IsVisible() const
Get whether the window is visible.
Definition: SceneEditor.cpp:82
void Show()
Show the editor.
Definition: SceneEditor.cpp:18
bool entityPressed
Did we press on an entity this frame.
Definition: SceneEditor.hpp:48
void SetScene(const std::string &path, std::string *scene)
Set the scene to edit.
Definition: SceneEditor.cpp:67
Json::Value GetSaveFileJson(std::string *filename) const
Gets a Json file representing the save file.
Definition: SceneEditor.cpp:95
void Save() const
Save currently open scene to file.
Definition: SceneEditor.cpp:90
EntityEditor entityEditor
The Entity Editor.
Definition: SceneEditor.hpp:51
SceneEditor()
Constructor.
Definition: SceneEditor.cpp:14
void SetVisible(bool visible)
Set whether the window should be visible.
Definition: SceneEditor.cpp:86
Definition: AssetEditor.hpp:9