-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMenuState.h
More file actions
100 lines (69 loc) · 1.81 KB
/
MenuState.h
File metadata and controls
100 lines (69 loc) · 1.81 KB
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
98
99
100
/*
* MenuState.h
* Prototyp
*
* Created by Christian Pehle on 05.09.09.
* Copyright 2009 Orbifold. All rights reserved.
*
*/
#ifndef MenuState_H
#define MenuState_H
#include <Ogre/OgreCamera.h>
#include "GameState.h"
#include "Trays.h"
#include "Game.h"
namespace Orbifold {
class Game;
class MenuState : public GameState, public SdkTrayListener {
public:
void enter();
void exit();
void save();
void restore();
void initialise();
void shutdown();
// Update
void update();
static MenuState* getSingleton();
//
bool keyPressed(const OIS::KeyEvent &evt);
bool keyReleased(const OIS::KeyEvent &evt);
bool mouseMoved(const OIS::MouseEvent &evt);
bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
//
void windowResized(Ogre::RenderWindow* rw);
void windowMoved(Ogre::RenderWindow* rw);
bool windowClosing(Ogre::RenderWindow* rw);
void windowClosed(Ogre::RenderWindow* rw);
void windowFocusChange(Ogre::RenderWindow* rw);
//
virtual void yesNoDialogClosed(const Ogre::DisplayString& question, bool yesHit);
virtual void buttonHit(SdkButton* b);
virtual void itemSelected(SelectMenu* menu);
virtual void sliderMoved(Slider* slider);
protected:
static MenuState* instance;
Ogre::Root *ogre;
Ogre::RenderWindow *window;
Ogre::SceneManager *scene;
Ogre::Camera *camera;
SdkTrayManager* tray;
SelectMenu* rendererMenu;
bool contentSetup;
bool resourcesLoaded;
bool firstEntry;
void setupContent();
void cleanupContent();
void locateResources();
void loadResources();
void unloadResources();
void createDummyScene();
void destroyDummyScene();
void setupWidgets();
private:
MenuState();
~MenuState();
};
}
#endif