]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackTypeMenu.h
renamed TargetSelections Enemies to Monsters
[l2e.git] / src / battle / AttackTypeMenu.h
index 08caf7f4160c3e93e4bed77eb4425770af317518..4b38dd3bd45d2ecf908fb0242df93d94e5a13123 100644 (file)
@@ -8,8 +8,7 @@
 #ifndef BATTLE_ATTACKTYPEMENU_H_
 #define BATTLE_ATTACKTYPEMENU_H_
 
-namespace app { class Input; }
-
+#include "AttackChoice.h"
 #include "../geometry/Point.h"
 #include "../graphics/Sprite.h"
 
@@ -19,22 +18,13 @@ 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 Select(AttackChoice::Type t) { selected = t; }
+       AttackChoice::Type Selected() const { return selected; }
        void Render(SDL_Surface *screen, const geometry::Point<int> &position);
 
        int Width() const { return 3 * IconWidth(); }
@@ -44,7 +34,7 @@ public:
 
 private:
        const graphics::Sprite *icons;
-       Icon selected;
+       AttackChoice::Type selected;
 
 };