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