DDraceNetwork Docs
editor_object.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_EDITOR_OBJECT_H
2#define GAME_EDITOR_EDITOR_OBJECT_H
3
4#include <functional>
5
6#include <engine/input.h>
8
9class CUi;
10class CEditor;
11class IClient;
12class CConfig;
13class IConsole;
14class IEngine;
15class IGraphics;
16class ISound;
17class ITextRender;
18class IStorage;
19class CRenderTools;
20
22{
23public:
24 virtual ~CEditorObject() = default;
25
31 virtual void OnInit(CEditor *pEditor);
32
36 virtual void OnUpdate();
37
42 virtual bool OnInput(const IInput::CEvent &Event);
43
44 virtual void OnRender(CUIRect View);
45
49 virtual void OnHot();
50
54 virtual void OnActive();
55
56 virtual void OnReset();
57 virtual void OnMapLoad();
58
59 bool IsHot();
60 void SetHot();
61 void UnsetHot();
62
63 bool IsActive();
64 void SetActive();
65 void SetInactive();
66
67 CEditor *Editor();
68 const CEditor *Editor() const;
69 IInput *Input();
70 IClient *Client();
71 CConfig *Config();
73 IEngine *Engine();
75 ISound *Sound();
78 CUi *Ui();
80
81private:
83};
84
85#endif
Definition: config.h:23
Definition: editor_object.h:22
void SetActive()
Definition: editor_object.cpp:52
void SetInactive()
Definition: editor_object.cpp:58
virtual void OnUpdate()
Definition: editor_object.cpp:11
IInput * Input()
Definition: editor_object.cpp:68
virtual bool OnInput(const IInput::CEvent &Event)
Definition: editor_object.cpp:19
bool IsActive()
Definition: editor_object.cpp:47
bool IsHot()
Definition: editor_object.cpp:29
virtual void OnReset()
Definition: editor_object.cpp:26
void UnsetHot()
Definition: editor_object.cpp:39
CEditor * Editor()
Definition: editor_object.cpp:66
IStorage * Storage()
Definition: editor_object.cpp:76
virtual ~CEditorObject()=default
virtual void OnMapLoad()
Definition: editor_object.cpp:27
IClient * Client()
Definition: editor_object.cpp:69
void SetHot()
Definition: editor_object.cpp:34
IGraphics * Graphics()
Definition: editor_object.cpp:73
CRenderTools * RenderTools()
Definition: editor_object.cpp:78
virtual void OnHot()
Definition: editor_object.cpp:45
virtual void OnActive()
Definition: editor_object.cpp:64
IEngine * Engine()
Definition: editor_object.cpp:72
ITextRender * TextRender()
Definition: editor_object.cpp:75
virtual void OnRender(CUIRect View)
Definition: editor_object.cpp:24
CEditor * m_pEditor
Definition: editor_object.h:82
IConsole * Console()
Definition: editor_object.cpp:71
CConfig * Config()
Definition: editor_object.cpp:70
ISound * Sound()
Definition: editor_object.cpp:74
CUi * Ui()
Definition: editor_object.cpp:77
virtual void OnInit(CEditor *pEditor)
Definition: editor_object.cpp:5
Definition: editor.h:276
Definition: render.h:188
Definition: ui_rect.h:11
Definition: ui.h:283
Definition: client.h:36
Definition: console.h:18
Definition: engine.h:15
Definition: graphics.h:183
Definition: input.h:24
Definition: input.h:20
Definition: sound.h:12
Definition: storage.h:20
Definition: textrender.h:312