]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackTypeMenu.h
renamed namespace geometry -> math
[l2e.git] / src / battle / AttackTypeMenu.h
1 #ifndef BATTLE_ATTACKTYPEMENU_H_
2 #define BATTLE_ATTACKTYPEMENU_H_
3
4 #include "AttackChoice.h"
5 #include "../math/Vector.h"
6 #include "../graphics/Sprite.h"
7
8 #include <SDL.h>
9
10 namespace battle {
11
12 class AttackTypeMenu {
13
14 public:
15         explicit AttackTypeMenu(const graphics::Sprite *icons)
16         : icons(icons), selected(AttackChoice::SWORD) { }
17
18 public:
19         void Select(AttackChoice::Type t) { selected = t; }
20         AttackChoice::Type Selected() const { return selected; }
21         void Render(SDL_Surface *screen, const math::Vector<int> &position);
22
23         int Width() const { return 3 * IconWidth(); }
24         int Height() const { return 3 * IconHeight(); }
25         math::Vector<int> Size() const { return 3 * IconSize(); }
26         int IconWidth() const { return icons->Width(); }
27         int IconHeight() const { return icons->Height(); }
28         const math::Vector<int> &IconSize() const { return icons->Size(); }
29
30 private:
31         const graphics::Sprite *icons;
32         AttackChoice::Type selected;
33
34 };
35
36 }
37
38 #endif /* BATTLE_ATTACKTYPEMENU_H_ */