Copperfield Engine 0.1
C++ Game Engine
Loading...
Searching...
No Matches
editor.hpp
1#pragma once
2
4struct RenderTreeCmp;
5class Window;
6struct LightCmp;
7struct CameraCmp;
8struct TransformCmp;
9struct RenderCmp;
10struct BoxCmp;
11struct AudioCmp;
12
14class Editor{
15public:
16 explicit Editor(Window& window);
17 ~Editor();
18 Editor(const Editor& o) = delete;
19 Editor(Editor&& o) = delete;
20 Editor& operator= (const Editor&) = delete;
21 Editor& operator= (Editor&&) = delete;
22
23 void collapsingEnt(const ComponentManager& component_manager,
24 unsigned id);
25 void SceneTree(const ComponentManager& component_manager);
26 void displayComponents(const ComponentManager& component_manager,
27 unsigned id, const std::string& name);
28
29 void preUpdate();
30 void update();
31 void ShowLogs() const;
32
35 static void setShowImGui(bool active);
36
39 static bool ShowImgui();
40
41
42
43private:
44 Window* window_;
45 struct ImGuiIO* io_;
46 inline static bool show_imgui_;
47 int entity_count_;
48 bool open_;
49
50 float window_width_;
51 float window_height_;
52 float tree_width_;
53 float log_height_;
54 float detail_width_;
55};
Handles anything related to entities and components in the engine.
Definition: component_manager.hpp:29
Display and allows to modify entity information in real time.
Definition: editor.hpp:14
static bool ShowImgui()
Return the state of the editor.
static void setShowImGui(bool active)
Activete or deactivete the editor and the mouse cursor.
Creates and updates a window.
Definition: window.hpp:20
Component used for audio reproduction.
Definition: default_components.hpp:40
Component used to detect collisions.
Definition: default_components.hpp:337
Component used to render the scene. There must be one and only one of this component on the scene.
Definition: default_components.hpp:161
Component used to simulate different types of lights.
Definition: default_components.hpp:69
Component used to render an object.
Definition: default_components.hpp:237
Component used to give a position, rotation, and scale to an entity.
Definition: default_components.hpp:284