]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackTypeMenu.h
db07443fd7e008ba26c7045e6108beb162a61cba
[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 #include "AttackChoice.h"
12 #include "../geometry/Vector.h"
13 #include "../graphics/Sprite.h"
14
15 #include <SDL.h>
16
17 namespace battle {
18
19 class AttackTypeMenu {
20
21 public:
22         explicit AttackTypeMenu(const graphics::Sprite *icons)
23         : icons(icons), selected(AttackChoice::SWORD) { }
24
25 public:
26         void Select(AttackChoice::Type t) { selected = t; }
27         AttackChoice::Type Selected() const { return selected; }
28         void Render(SDL_Surface *screen, const geometry::Vector<int> &position);
29
30         int Width() const { return 3 * IconWidth(); }
31         int Height() const { return 3 * IconHeight(); }
32         geometry::Vector<int> Size() const { return 3 * IconSize(); }
33         int IconWidth() const { return icons->Width(); }
34         int IconHeight() const { return icons->Height(); }
35         const geometry::Vector<int> &IconSize() const { return icons->Size(); }
36
37 private:
38         const graphics::Sprite *icons;
39         AttackChoice::Type selected;
40
41 };
42
43 }
44
45 #endif /* BATTLE_ATTACKTYPEMENU_H_ */