]> git.localhorst.tv Git - l2e.git/blob - src/menu/CapsuleMenu.h
added capsule feed menu dummy
[l2e.git] / src / menu / CapsuleMenu.h
1 #ifndef MENU_CAPSULEMENU_H_
2 #define MENU_CAPSULEMENU_H_
3
4 #include "fwd.h"
5 #include "../app/State.h"
6 #include "../common/fwd.h"
7 #include "../geometry/Vector.h"
8 #include "../graphics/Menu.h"
9
10 namespace menu {
11
12 class CapsuleMenu
13 : public app::State {
14
15 public:
16         explicit CapsuleMenu(PartyMenu *parent);
17
18 public:
19         virtual void HandleEvents(const app::Input &);
20         virtual void UpdateWorld(float deltaT);
21         virtual void Render(SDL_Surface *);
22
23         void RenderBackground(SDL_Surface *screen) const;
24         void RenderCapsule(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
25         void RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
26         void RenderWheel(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
27         void RenderStats(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
28         void RenderStatsLine(SDL_Surface *screen, const geometry::Vector<int> &offset, const char *name, int value) const;
29         void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
30
31 public:
32         common::GameConfig &Game();
33         const common::GameConfig &Game() const;
34         Resources &Res();
35         const Resources &Res() const;
36         const common::Capsule &GetCapsule() const;
37
38         int Width() const;
39         int Height() const;
40
41 private:
42         virtual void OnEnterState(SDL_Surface *screen);
43         virtual void OnExitState(SDL_Surface *screen);
44         virtual void OnResumeState(SDL_Surface *screen);
45         virtual void OnPauseState(SDL_Surface *screen);
46
47         virtual void OnResize(int width, int height);
48
49 private:
50         PartyMenu *parent;
51         enum Choice {
52                 CHOICE_FEED,
53                 CHOICE_CHANGE,
54                 CHOICE_NAME,
55         };
56         graphics::Menu<Choice> menu;
57
58 };
59
60 }
61
62 #endif /* MENU_CAPSULEMENU_H_ */