]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackTypeMenu.h
removed useless comments
[l2e.git] / src / battle / AttackTypeMenu.h
index 26a9dd9d07089ea128fe566c884c01fd0d30d045..5f10c463f18b68d492c94ed38eb910cd54861b34 100644 (file)
@@ -1,14 +1,8 @@
-/*
- * AttackTypeMenu.h
- *
- *  Created on: Aug 6, 2012
- *      Author: holy
- */
-
 #ifndef BATTLE_ATTACKTYPEMENU_H_
 #define BATTLE_ATTACKTYPEMENU_H_
 
-#include "../geometry/Point.h"
+#include "AttackChoice.h"
+#include "../math/Vector.h"
 #include "../graphics/Sprite.h"
 
 #include <SDL.h>
@@ -17,35 +11,28 @@ 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 Select(Icon i) { selected = i; }
-       Icon Selected() const { return selected; }
-       void Render(SDL_Surface *screen, const geometry::Point<int> &position);
+       void Select(AttackChoice::Type t) { selected = t; }
+       AttackChoice::Type Selected() const { return selected; }
+       void Render(SDL_Surface *screen, const math::Vector<int> &position);
 
        int Width() const { return 3 * IconWidth(); }
        int Height() const { return 3 * IconHeight(); }
+       math::Vector<int> Size() const { return 3 * IconSize(); }
        int IconWidth() const { return icons->Width(); }
        int IconHeight() const { return icons->Height(); }
+       const math::Vector<int> &IconSize() const { return icons->Size(); }
 
 private:
        const graphics::Sprite *icons;
-       Icon selected;
+       AttackChoice::Type selected;
 
 };
 
 }
 
-#endif /* BATTLE_ATTACKTYPEMENU_H_ */
+#endif