]> git.localhorst.tv Git - l2e.git/blob - src/menu/CapsuleNameMenu.h
added capsule name menu stub
[l2e.git] / src / menu / CapsuleNameMenu.h
1 #ifndef MENU_CAPSULENAMEMENU_H_
2 #define MENU_CAPSULENAMEMENU_H_
3
4 #include "fwd.h"
5 #include "../app/State.h"
6 #include "../common/fwd.h"
7 #include "../geometry/Vector.h"
8
9 namespace menu {
10
11 class CapsuleMenu;
12
13 class CapsuleNameMenu
14 : public app::State {
15
16 public:
17         explicit CapsuleNameMenu(CapsuleMenu *parent);
18
19 public:
20         virtual void HandleEvents(const app::Input &);
21         virtual void UpdateWorld(float deltaT);
22         virtual void Render(SDL_Surface *);
23
24 public:
25         int Width() const;
26         int Height() const;
27
28 private:
29         virtual void OnEnterState(SDL_Surface *screen);
30         virtual void OnExitState(SDL_Surface *screen);
31         virtual void OnResumeState(SDL_Surface *screen);
32         virtual void OnPauseState(SDL_Surface *screen);
33
34         virtual void OnResize(int width, int height);
35
36         const common::Capsule &GetCapsule() const;
37
38         void LoadInventory();
39
40         void RenderName(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
41         void RenderAlphabet(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
42
43 private:
44         CapsuleMenu *parent;
45         int cursor;
46         char buffer[6];
47
48 };
49
50 }
51
52 #endif /* MENU_CAPSULENAMEMENU_H_ */