]> git.localhorst.tv Git - l2e.git/blob - src/menu/StatusMenu.h
f6bcb293f37d782b3b380862149ad157a855366e
[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
16 namespace menu {
17
18 class StatusMenu
19 : public app::State {
20
21 public:
22         StatusMenu(PartyMenu *parent, int heroIndex);
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 NextHero();
42         void PreviousHero();
43
44         const common::Hero &GetHero() const;
45
46         void RenderStatus(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
47         void RenderStats(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
48         void RenderStatsLine(const char *label, int number, SDL_Surface *screen, const geometry::Vector<int> &position) const;
49         void RenderEquipment(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
50         void RenderEquipmentLine(const common::Item *, SDL_Surface *screen, const geometry::Vector<int> &position) const;
51         /// @param offset the top right corner!
52         void RenderExperience(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
53         /// @param offset the top right corner!
54         void RenderNextLevel(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
55
56 private:
57         PartyMenu *parent;
58         int cursor;
59
60 };
61
62 }
63
64 #endif /* MENU_STATUSMENU_H_ */