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