X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackTypeMenu.h;h=4b38dd3bd45d2ecf908fb0242df93d94e5a13123;hb=8639675fbf1d232ab8188dd283149ab650e10336;hp=b63ec97e53e55109c6abb2f4ec3f2f3378dd5fc9;hpb=c0860451b5fd681c3b3b8d985e8831276bbd917f;p=l2e.git diff --git a/src/battle/AttackTypeMenu.h b/src/battle/AttackTypeMenu.h index b63ec97..4b38dd3 100644 --- a/src/battle/AttackTypeMenu.h +++ b/src/battle/AttackTypeMenu.h @@ -8,10 +8,9 @@ #ifndef BATTLE_ATTACKTYPEMENU_H_ #define BATTLE_ATTACKTYPEMENU_H_ -namespace app { class Input; } -namespace graphics { class Sprite; } - +#include "AttackChoice.h" #include "../geometry/Point.h" +#include "../graphics/Sprite.h" #include @@ -19,27 +18,23 @@ 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 ¢er); + void Select(AttackChoice::Type t) { selected = t; } + AttackChoice::Type Selected() const { return selected; } + void Render(SDL_Surface *screen, const geometry::Point &position); + + int Width() const { return 3 * IconWidth(); } + int Height() const { return 3 * IconHeight(); } + int IconWidth() const { return icons->Width(); } + int IconHeight() const { return icons->Height(); } private: const graphics::Sprite *icons; - Icon selected; + AttackChoice::Type selected; };