]> git.localhorst.tv Git - l2e.git/blob - src/menu/StatusMenu.h
5f6f986eb465b69ba87434de87b3fd138aaac40c
[l2e.git] / src / menu / StatusMenu.h
1 /*
2  * StatusMenu.h
3  *
4  *  Created on: Oct 22, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_STATUSMENU_H_
9 #define MENU_STATUSMENU_H_
10
11 #include "fwd.h"
12 #include "../app/State.h"
13 #include "../common/fwd.h"
14 #include "../geometry/Vector.h"
15 #include "../graphics/Menu.h"
16
17 namespace menu {
18
19 class StatusMenu
20 : public app::State {
21
22 public:
23         StatusMenu(PartyMenu *parent, int heroIndex);
24
25 public:
26         virtual void HandleEvents(const app::Input &);
27         virtual void UpdateWorld(float deltaT);
28         virtual void Render(SDL_Surface *);
29
30 public:
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 NextHero();
43         void PreviousHero();
44
45         const common::Hero &GetHero() const;
46
47         void RenderStatus(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
48         void RenderStats(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
49         void RenderStatsLine(const char *label, int number, SDL_Surface *screen, const geometry::Vector<int> &position) const;
50         void RenderEquipment(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
51         void RenderEquipmentLine(const common::Item *, SDL_Surface *screen, const geometry::Vector<int> &position) const;
52         /// @param offset the top right corner!
53         void RenderExperience(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
54         /// @param offset the top right corner!
55         void RenderNextLevel(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
56         void RenderIkari(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
57         void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
58
59 private:
60         PartyMenu *parent;
61         int cursor;
62         graphics::Menu<int> menu;
63
64 };
65
66 }
67
68 #endif /* MENU_STATUSMENU_H_ */