]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
added item select state
[l2e.git] / src / battle / BattleState.h
index 484e4529c6a49d7d78776b3de9420f286a96bcdf..65e8727906859fd442c174107ce92782d603fb1d 100644 (file)
@@ -18,6 +18,7 @@
 #include "../app/State.h"
 #include "../geometry/Point.h"
 #include "../geometry/Vector.h"
+#include "../graphics/Menu.h"
 
 #include <vector>
 #include <SDL.h>
@@ -77,6 +78,10 @@ public:
        bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; }
        void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
        bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
+       graphics::Menu</* Spell */ void *> &GetSpellMenu() { return spellMenus[activeHero]; }
+       const graphics::Menu</* Spell */ void *> &GetSpellMenu() const { return spellMenus[activeHero]; }
+       graphics::Menu</* Item */ void *> &GetItemMenu() { return itemMenu; }
+               const graphics::Menu</* Item */ void *> &GetItemMenu() const { return itemMenu; }
 
 public:
        geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
@@ -103,6 +108,8 @@ private:
        std::vector<geometry::Point<int> > heroesPositions;
        std::vector<Monster> monsters;
        std::vector<Hero> heroes;
+       std::vector<graphics::Menu</* Spell */ void *> > spellMenus;
+       graphics::Menu</* Item */ void *> itemMenu;
        std::vector<HeroTag> heroTags;
        std::vector<AttackChoice> attackChoices;
        int activeHero;