Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 710 vs 802 for /trunk/Source Code/GUI/GUIEditor/Headers/GUIEditor.h

Diff revisions: vs.
  @@ -33,7 +33,6 @@
33 33 #define _GUI_EDITOR_H_
34 34
35 35 #include "Platform/Headers/PlatformDefines.h"
36 - #include <assert.h>
37 36
38 37 namespace CEGUI {
39 38 class Font;
  @@ -45,10 +44,14 @@
45 44
46 45 namespace Divide {
47 46
47 + class GUI;
48 48 FWD_DECLARE_MANAGED_CLASS(SceneGraphNode);
49 +
49 50 /// Our world editor interface
50 - DEFINE_SINGLETON(GUIEditor)
51 - public:
51 + class GUIEditor {
52 + public:
53 + explicit GUIEditor(GUI& context);
54 + ~GUIEditor();
52 55 bool init();
53 56 void setVisible(bool visible); //< Hide or show the editor
54 57 bool isVisible(); //< Return true if editor is visible, false if is hidden
  @@ -58,9 +61,7 @@
58 61 /// Returns true if the last click was in one of the editor's windows
59 62 inline bool wasControlClick() { return _wasControlClick; }
60 63
61 - private:
62 - GUIEditor();
63 - ~GUIEditor();
64 + private:
64 65 void RegisterHandlers();
65 66 void UpdateControls();
66 67 void TrackSelection();
  @@ -145,13 +146,13 @@
145 146
146 147 F32& currentValues(TransformFields transform, ControlFields control) {
147 148 assert(transform < TransformFields::COUNT &&
148 - control < ControlFields::COUNT);
149 + control < ControlFields::COUNT);
149 150 return _currentValues[to_uint(transform)][to_uint(control)];
150 151 }
151 152
152 153 CEGUI::Editbox*& valuesField(TransformFields transform, ControlFields control) {
153 154 assert(transform < TransformFields::COUNT &&
154 - control < ControlFields::COUNT);
155 + control < ControlFields::COUNT);
155 156 return _valuesField[to_uint(transform)][to_uint(control)];
156 157 }
157 158
  @@ -161,17 +162,18 @@
161 162 }
162 163
163 164 CEGUI::Window*& transformButtonsInc(TransformFields transform, ControlFields control) {
164 - assert(transform < TransformFields::COUNT &&
165 - control < ControlFields::COUNT);
165 + assert(transform < TransformFields::COUNT &&
166 + control < ControlFields::COUNT);
166 167 return _transformButtonsInc[to_uint(transform)][to_uint(control)];
167 168 }
168 169
169 - CEGUI::Window*& transformButtonsDec(TransformFields transform, ControlFields control) {
170 - assert(transform < TransformFields::COUNT &&
171 - control < ControlFields::COUNT);
170 + CEGUI::Window*& transformButtonsDec(TransformFields transform, ControlFields control) {
171 + assert(transform < TransformFields::COUNT &&
172 + control < ControlFields::COUNT);
172 173 return _transformButtonsDec[to_uint(transform)][to_uint(control)];
173 174 }
174 - private:
175 + private:
176 + GUI& _context;
175 177 bool _init;
176 178 bool _wasControlClick;
177 179 bool _createNavMeshQueued;
  @@ -193,9 +195,9 @@
193 195 std::array<CEGUI::Editbox *, to_const_uint(ControlFields::COUNT)>,
194 196 to_const_uint(TransformFields::COUNT)> _valuesField;
195 197 std::array<std::array<F32, to_const_uint(ControlFields::COUNT)>,
196 - to_const_uint(TransformFields::COUNT)> _currentValues;
198 + to_const_uint(TransformFields::COUNT)> _currentValues;
197 199
198 - END_SINGLETON
200 + };
199 201
200 202 }; // namespace Divide
201 203 #endif