]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackTypeMenu.h
added prototype for battle's hero tags
[l2e.git] / src / battle / AttackTypeMenu.h
1 /*
2  * AttackTypeMenu.h
3  *
4  *  Created on: Aug 6, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_ATTACKTYPEMENU_H_
9 #define BATTLE_ATTACKTYPEMENU_H_
10
11 namespace app { class Input; }
12
13 #include "../geometry/Point.h"
14 #include "../graphics/Sprite.h"
15
16 #include <SDL.h>
17
18 namespace battle {
19
20 class AttackTypeMenu {
21
22 public:
23         enum Icon {
24                 SWORD,
25                 MAGIC,
26                 DEFEND,
27                 IKARI,
28                 ITEM
29         };
30
31 public:
32         explicit AttackTypeMenu(const graphics::Sprite *icons)
33         : icons(icons), selected(SWORD) { }
34
35 public:
36         void ReadInput(const app::Input &);
37         Icon Selected() const { return selected; }
38         void Render(SDL_Surface *screen, const geometry::Point<int> &position);
39
40         int Width() const { return 3 * IconWidth(); }
41         int Height() const { return 3 * IconHeight(); }
42         int IconWidth() const { return icons->Width(); }
43         int IconHeight() const { return icons->Height(); }
44
45 private:
46         const graphics::Sprite *icons;
47         Icon selected;
48
49 };
50
51 }
52
53 #endif /* BATTLE_ATTACKTYPEMENU_H_ */