]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackTypeMenu.h
removed stupid file headers that eclipse put in
[l2e.git] / src / battle / AttackTypeMenu.h
index b63ec97e53e55109c6abb2f4ec3f2f3378dd5fc9..aa5f9c5486029db579de168f04a978feb91a655e 100644 (file)
@@ -1,17 +1,9 @@
-/*
- * AttackTypeMenu.h
- *
- *  Created on: Aug 6, 2012
- *      Author: holy
- */
-
 #ifndef BATTLE_ATTACKTYPEMENU_H_
 #define BATTLE_ATTACKTYPEMENU_H_
 
-namespace app { class Input; }
-namespace graphics { class Sprite; }
-
-#include "../geometry/Point.h"
+#include "AttackChoice.h"
+#include "../geometry/Vector.h"
+#include "../graphics/Sprite.h"
 
 #include <SDL.h>
 
@@ -19,27 +11,25 @@ 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<int> &center);
+       void Select(AttackChoice::Type t) { selected = t; }
+       AttackChoice::Type Selected() const { return selected; }
+       void Render(SDL_Surface *screen, const geometry::Vector<int> &position);
+
+       int Width() const { return 3 * IconWidth(); }
+       int Height() const { return 3 * IconHeight(); }
+       geometry::Vector<int> Size() const { return 3 * IconSize(); }
+       int IconWidth() const { return icons->Width(); }
+       int IconHeight() const { return icons->Height(); }
+       const geometry::Vector<int> &IconSize() const { return icons->Size(); }
 
 private:
        const graphics::Sprite *icons;
-       Icon selected;
+       AttackChoice::Type selected;
 
 };