X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackTypeMenu.h;h=d31d63babf03593b07dac87eaa93473d94f2ab81;hb=0542849dfccfec1ce1477265fa0fee2401a8fb23;hp=08caf7f4160c3e93e4bed77eb4425770af317518;hpb=010a336797f1419945bed60560cc61fb492793f4;p=l2e.git diff --git a/src/battle/AttackTypeMenu.h b/src/battle/AttackTypeMenu.h index 08caf7f..d31d63b 100644 --- a/src/battle/AttackTypeMenu.h +++ b/src/battle/AttackTypeMenu.h @@ -8,9 +8,8 @@ #ifndef BATTLE_ATTACKTYPEMENU_H_ #define BATTLE_ATTACKTYPEMENU_H_ -namespace app { class Input; } - -#include "../geometry/Point.h" +#include "AttackChoice.h" +#include "../geometry/Vector.h" #include "../graphics/Sprite.h" #include @@ -19,23 +18,14 @@ namespace battle { class AttackTypeMenu { -public: - enum Icon { - SWORD, - MAGIC, - DEFEND, - IKARI, - ITEM - }; - public: explicit AttackTypeMenu(const graphics::Sprite *icons) - : icons(icons), selected(SWORD) { } + : icons(icons), selected(AttackChoice::SWORD) { } public: - void ReadInput(const app::Input &); - Icon Selected() const { return selected; } - void Render(SDL_Surface *screen, const geometry::Point &position); + void Select(AttackChoice::Type t) { selected = t; } + AttackChoice::Type Selected() const { return selected; } + void Render(SDL_Surface *screen, const geometry::Vector &position); int Width() const { return 3 * IconWidth(); } int Height() const { return 3 * IconHeight(); } @@ -44,7 +34,7 @@ public: private: const graphics::Sprite *icons; - Icon selected; + AttackChoice::Type selected; };