]> git.localhorst.tv Git - l2e.git/blob - src/menu/StatusMenu.h
removed lazy fwd headers
[l2e.git] / src / menu / StatusMenu.h
1 #ifndef MENU_STATUSMENU_H_
2 #define MENU_STATUSMENU_H_
3
4 namespace common {
5         class Hero;
6         class Item;
7 }
8 namespace math {
9         template<class>
10         class Vector;
11 }
12 namespace menu {
13         class PartyMenu;
14 }
15
16 #include "../app/State.h"
17 #include "../graphics/Menu.h"
18
19 namespace menu {
20
21 class StatusMenu
22 : public app::State {
23
24 public:
25         StatusMenu(PartyMenu *parent, int heroIndex);
26
27 public:
28         virtual void HandleEvents(const app::Input &);
29         virtual void UpdateWorld(Uint32 deltaT);
30         virtual void Render(SDL_Surface *);
31
32 public:
33         int Width() const;
34         int Height() const;
35
36 private:
37         virtual void OnEnterState(SDL_Surface *screen);
38         virtual void OnExitState(SDL_Surface *screen);
39         virtual void OnResumeState(SDL_Surface *screen);
40         virtual void OnPauseState(SDL_Surface *screen);
41
42         virtual void OnResize(int width, int height);
43
44         void NextHero();
45         void PreviousHero();
46
47         const common::Hero &GetHero() const;
48
49         void RenderStatus(SDL_Surface *screen, const math::Vector<int> &offset) const;
50         void RenderStats(SDL_Surface *screen, const math::Vector<int> &offset) const;
51         void RenderStatsLine(const char *label, int number, SDL_Surface *screen, const math::Vector<int> &position) const;
52         void RenderEquipment(SDL_Surface *screen, const math::Vector<int> &offset) const;
53         void RenderEquipmentLine(const common::Item *, SDL_Surface *screen, const math::Vector<int> &position) const;
54         /// @param offset the top right corner!
55         void RenderExperience(SDL_Surface *screen, const math::Vector<int> &offset) const;
56         /// @param offset the top right corner!
57         void RenderNextLevel(SDL_Surface *screen, const math::Vector<int> &offset) const;
58         void RenderIkari(SDL_Surface *screen, const math::Vector<int> &offset) const;
59         void RenderMenu(SDL_Surface *screen, const math::Vector<int> &offset) const;
60
61 private:
62         PartyMenu *parent;
63         int cursor;
64         graphics::Menu<int> menu;
65
66 };
67
68 }
69
70 #endif /* MENU_STATUSMENU_H_ */