forked from rubenwardy/NodeBoxEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditorState.cpp
More file actions
32 lines (28 loc) · 696 Bytes
/
Copy pathEditorState.cpp
File metadata and controls
32 lines (28 loc) · 696 Bytes
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
#include "EditorState.h"
EditorState::EditorState(irr::IrrlichtDevice* dev,Project* proj,Configuration* settings)
:_device(dev),project(proj),currentmode(0),
plane_tri(NULL),mousedown(false), _settings(settings),
close_requested(false),
_menu(NULL)
{
_modes = new list<EditorMode*>();
for (int i = 0; i<NUMBER_OF_KEYS; i++){
keys[i] = EKS_UP;
}
}
EditorMode* EditorState::Mode() const{
int i = 0;
for(list<EditorMode*>::ConstIterator Iterator = _modes->begin(); Iterator != _modes->end(); ++Iterator)
{
EditorMode* n = *Iterator;
if (n){
if (i==currentmode)
return n;
i++;
}
}
return NULL;
}
void EditorState::AddMode(EditorMode* value){
_modes->push_back(value);
}