]> git.localhorst.tv Git - l2e.git/blob - src/battle/MoveMenu.h
6a177ef4b5b49309ae807c476bb5f23b037e51fb
[l2e.git] / src / battle / MoveMenu.h
1 #ifndef BATTLE_MOVEMENU_H_
2 #define BATTLE_MOVEMENU_H_
3
4 #include "../math/Vector.h"
5 #include "../graphics/Sprite.h"
6
7 namespace battle {
8
9 class MoveMenu {
10
11 public:
12         enum Icon {
13                 ATTACK,
14                 CHANGE,
15                 RUN
16         };
17
18 public:
19         explicit MoveMenu(const graphics::Sprite *icons)
20         : icons(icons), selected(ATTACK) { }
21         ~MoveMenu() { }
22
23 public:
24         void Select(Icon i) { selected = i; }
25         Icon Selected() const { return selected; }
26         void Render(SDL_Surface *screen, const math::Vector<int> &position);
27
28         int Width() const { return IconWidth(); }
29         int Height() const { return 3 * IconHeight(); }
30         int IconWidth() const { return icons->Width(); }
31         int IconHeight() const { return icons->Height(); }
32
33 private:
34         const graphics::Sprite *icons;
35         Icon selected;
36
37 };
38
39 }
40
41 #endif /* BATTLE_MOVEMENU_H_ */