Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 713 vs 802 for /trunk/Source Code/GUI/GUIEditor/GUIEditor.cpp

Diff revisions: vs.
  @@ -15,8 +15,9 @@
15 15
16 16 namespace Divide {
17 17
18 - GUIEditor::GUIEditor()
19 - : _init(false),
18 + GUIEditor::GUIEditor(GUI& context)
19 + : _context(context),
20 + _init(false),
20 21 _wasControlClick(false),
21 22 _createNavMeshQueued(false),
22 23 _pauseSelectionTracking(false),
  @@ -238,8 +239,8 @@
238 239 _wasControlClick = false;
239 240 bool state = true;
240 241 if (_createNavMeshQueued) {
241 - Scene& activeScene = *GUI::instance().activeScene();
242 - AI::AIManager& aiManager = GUI::instance().activeScene()->aiManager();
242 + Scene& activeScene = *_context.activeScene();
243 + AI::AIManager& aiManager = _context.activeScene()->aiManager();
243 244
244 245 state = false;
245 246 // Check if we already have a NavMesh created
  @@ -934,7 +935,7 @@
934 935
935 936 bool GUIEditor::Handle_CreateNavMesh(const CEGUI::EventArgs &e) {
936 937 Console::d_printfn("[Editor]: NavMesh creation queued!");
937 - GUI::instance().getConsole()->setVisible(true);
938 + _context.getConsole()->setVisible(true);
938 939 _createNavMeshQueued = true;
939 940 return true;
940 941 }
  @@ -951,7 +952,7 @@
951 952
952 953 bool GUIEditor::Handle_DeleteSelection(const CEGUI::EventArgs &e) {
953 954 Console::d_printfn("[Editor]: Deleting selection!");
954 - GUI::instance().activeScene()->sceneGraph().deleteNode(_currentSelection, false);
955 + _context.activeScene()->sceneGraph().deleteNode(_currentSelection, false);
955 956 return true;
956 957 }
957 958
  @@ -1043,7 +1044,7 @@
1043 1044 } else {
1044 1045 Console::d_printfn("[Editor]: NavMesh rendering disabled!");
1045 1046 }
1046 - GUI::instance()
1047 + _context
1047 1048 .activeScene()
1048 1049 ->aiManager()
1049 1050 .toggleNavMeshDebugDraw(toggleButton(ToggleButtons::TOGGLE_NAV_MESH_DRAW)->isSelected());