]> git.localhorst.tv Git - l2e.git/blob - src/menu/ConfigMenu.h
8bb81f40e0414f836d90f9b4d3103dba09aede78
[l2e.git] / src / menu / ConfigMenu.h
1 /*
2  * ConfigMenu.h
3  *
4  *  Created on: Nov 29, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_CONFIGMENU_H_
9 #define MENU_CONFIGMENU_H_
10
11 #include "fwd.h"
12 #include "../app/State.h"
13 #include "../geometry/Vector.h"
14 #include "../graphics/Menu.h"
15
16 namespace menu {
17
18 class ConfigMenu
19 : public app::State {
20
21 public:
22         explicit ConfigMenu(PartyMenu *parent);
23
24 public:
25         virtual void HandleEvents(const app::Input &);
26         virtual void UpdateWorld(float deltaT);
27         virtual void Render(SDL_Surface *);
28
29 public:
30         int Width() const;
31         int Height() const;
32
33 private:
34         virtual void OnEnterState(SDL_Surface *screen);
35         virtual void OnExitState(SDL_Surface *screen);
36         virtual void OnResumeState(SDL_Surface *screen);
37         virtual void OnPauseState(SDL_Surface *screen);
38
39         virtual void OnResize(int width, int height);
40
41         void RenderHeadline(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
42         void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
43
44 private:
45         PartyMenu *parent;
46         graphics::Menu<int> configMenu;
47
48 };
49
50 }
51
52 #endif /* MENU_CONFIGMENU_H_ */