blob: 3f9eb111bd83fcc20ae4d54794eba0c9764d9604 (
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
|
#pragma once
#include "GameObject.hpp"
#include "World.hpp"
#include <memory>
#include <string>
class App;
namespace ImGui {
const char* GetKeyNameGlfw(int key);
} // namespace ImGui
class EditorGameObjectAttachment {
public:
std::string name;
public:
static std::unique_ptr<EditorGameObjectAttachment> Create(GameObject* object);
virtual ~EditorGameObjectAttachment() = default;
};
class EditorInstance {
private:
App* mApp;
GameWorld* mWorld;
GameObject* mSelectedGameObject = nullptr;
public:
EditorInstance(App* app, GameWorld* world)
: mApp{ app }
, mWorld{ world } {}
void Show();
private:
void ShowWorldProperties();
void ShowInspector();
void ShowGameObjecetFields(GameObject* object);
void ShowGameObjectInTree(GameObject* object);
};
|