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