forked from rubenwardy/NodeBoxEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenuState.h
97 lines (88 loc) · 1.73 KB
/
MenuState.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef _MENUSTATE_H_INCLUDED_
#define _MENUSTATE_H_INCLUDED_
#include "common.h"
#include "EditorState.h"
// FILE
// --> New Project
// --> New Item
// -----------------
// --> Open Project
// -----------------
// --> Save Project
// --> Export
// --------------------
// --> Exit
//
// EDIT
// --> Undo
// --> Redo
// --------------------
// --> Snapping
// --> Limiting
//
// VIEW
// --> Tiled View
// --> Perspective View
// --> Top View
// --> Front View
// --> Side View
//
// PROJECT
// --> New Node box
// --> Delete Node box
// --------------------
// --> [nodeboxes]
//
// HELP
// --> Help Index
// --> About
enum GUI_ID
{
// File
GUI_FILE_NEW_PROJECT = 201,
GUI_FILE_NEW_ITEM = 202,
GUI_FILE_OPEN_PROJECT = 203,
GUI_FILE_SAVE_PROJECT = 204,
GUI_FILE_EXPORT = 205,
GUI_FILE_EXIT = 206,
// Edit
GUI_EDIT_UNDO = 207,
GUI_EDIT_REDO = 208,
GUI_EDIT_SNAP = 209,
GUI_EDIT_LIMIT = 210,
// View
GUI_VIEW_SP_ALL = 211,
GUI_VIEW_SP_PER = 212,
GUI_VIEW_SP_TOP = 213,
GUI_VIEW_SP_FRT = 214,
GUI_VIEW_SP_RHT = 215,
// Tools
GUI_PROJ_NEW_BOX = 216,
GUI_PROJ_DELETE_BOX = 217,
GUI_PROJ_LIST_AREA = 240,
// Help
GUI_HELP_HELP =218,
GUI_HELP_ABOUT = 219,
// Sidebar
GUI_SIDEBAR_TITLE = 220,
GUI_SIDEBAR_LISTBOX = 221,
GUI_SIDEBAR_LABEL = 222
};
class EditorState;
class MenuState{
public:
MenuState(EditorState* state);
void init();
void draw(IVideoDriver* driver);
bool OnEvent(const SEvent& event);
EditorState* GetState() const{return _state;}
IGUIContextMenu* GetMenu() const{return menubar;}
IGUIContextMenu* GetProjectMenu() const{return _projectmb;}
IGUIStaticText* GetSideBar() const{return _sidebar;}
private:
EditorState* _state;
IGUIContextMenu* menubar;
IGUIContextMenu* _projectmb;
IGUIStaticText* _sidebar;
};
#endif