-
Notifications
You must be signed in to change notification settings - Fork 0
/
MenuScreen.hpp
92 lines (71 loc) · 2.14 KB
/
MenuScreen.hpp
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
#pragma once
#include "IAppScreen.hpp"
#include "vitiGL.hpp"
#include <map>
class App;
class AppScreen;
class MenuScreen : public vitiGL::IAppScreen {
public:
MenuScreen(App* app, AppScreen* appScreen, vitiGL::Window* window);
~MenuScreen();
// Inherited via IAppScreen
virtual void onEntry() override;
virtual void onExit() override;
virtual void update() override;
virtual void draw() override;
virtual int next() const override;
virtual int previous() const override;
private:
void initGUI();
void initRadioButtons();
void initSliders();
void initRGBInputs();
void updateInput();
/* event handlers: ----------------------------------------------- */
//close Menus:
void onMainClose();
void onPLightClose();
void onDLightClose();
//Push Buttons:
bool onExitClicked(const CEGUI::EventArgs& e);
bool onContinueClicked(const CEGUI::EventArgs& e);
bool onLoad(const CEGUI::EventArgs& e);
bool onSave(const CEGUI::EventArgs& e);
bool onSaveFinished(const CEGUI::EventArgs& e);
bool onLoadFinished(const CEGUI::EventArgs& e);
void onLoadCancel();
void onSaveCancel();
//Radio Buttons
void onPhysicsToggled();
void onNormalsToggled();
void onWireframeToggled();
void onDebugWinToggled();
void onPShadowToggled();
void onDShadowToggled();
void onBloomToggled();
//Sliders:
void onDLightDiffuse();
void onDLightSpecular();
void onDLightVector();
void onPLightDiffuse();
void onPLightSpecular();
void onPLightPosition();
void onGammaChanged();
void onBloomChanged();
void onHdrChanged();
/* end of ecent handlers ------------------------------------------ */
/* Convert Cegui-String from editbox to an int: */
int getInt(const std::string& widgetName);
float getFloat(const std::string& widgetName);
CEGUI::Window* _menu;
vitiGL::Window* _window;
AppScreen* _appScreen;
vitiGL::GUI _gui;
vitiGL::Timer _timer;
/* this maps stores all editboxes that can change the scenes values: */
std::map<std::string, CEGUI::Slider*> _values;
/* this map stores all sliders: */
std::map<std::string, CEGUI::Slider*> _sliders;
std::vector<CEGUI::ListboxTextItem*> _loadList;
std::vector<CEGUI::ListboxTextItem*> _saveList;
};