]> git.localhorst.tv Git - l2e.git/blob - src/menu/SpellMenu.h
added spell menu dummy
[l2e.git] / src / menu / SpellMenu.h
1 /*
2  * SpellMenu.h
3  *
4  *  Created on: Nov 18, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_SPELLMENU_H_
9 #define MENU_SPELLMENU_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 SpellMenu
20 : public app::State {
21
22 public:
23         SpellMenu(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         const common::Hero &GetHero() const;
43
44         void LoadSpells();
45
46         void RenderHighlight(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
47         void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
48         void RenderSpells(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
49
50 private:
51         PartyMenu *parent;
52         SDL_Surface *highlight;
53         int cursor;
54         enum Choice {
55                 CHOICE_USE,
56                 CHOICE_SORT,
57         };
58         graphics::Menu<Choice> actionMenu;
59         graphics::Menu<const common::Spell *> spellMenu;
60
61 };
62
63 }
64
65 #endif /* MENU_SPELLMENU_H_ */