]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/PartyMenu.h
removed stupid file headers that eclipse put in
[l2e.git] / src / menu / PartyMenu.h
index aabc2060bf55616968c843a0ff21eb24abf6eb44..08ffa3823b46c1a8a6b07db38f6982fd75fdb398 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * PartyMenu.h
- *
- *  Created on: Oct 21, 2012
- *      Author: holy
- */
-
 #ifndef MENU_PARTYMENU_H_
 #define MENU_PARTYMENU_H_
 
@@ -13,6 +6,7 @@
 #include "../app/State.h"
 #include "../common/fwd.h"
 #include "../geometry/Vector.h"
+#include "../graphics/Menu.h"
 
 namespace menu {
 
@@ -29,9 +23,27 @@ public:
        virtual void Render(SDL_Surface *);
 
 public:
+       common::GameConfig &Game() { return *game; }
+       const common::GameConfig &Game() const { return *game; }
        Resources &Res();
        const Resources &Res() const;
 
+       int Width() const;
+       int Height() const;
+
+public:
+       void RenderBackground(SDL_Surface *screen) const;
+       void RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+       void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+       void RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+
+       geometry::Vector<int> StatusOffset(int index) const;
+       const HeroStatus &GetHeroStatus(int index) const { return status[index]; }
+
+       static void OnEquipSelect(void *, int);
+       static void OnSpellSelect(void *, int);
+       static void OnStatusSelect(void *, int);
+
 private:
        virtual void OnEnterState(SDL_Surface *screen);
        virtual void OnExitState(SDL_Surface *screen);
@@ -40,13 +52,23 @@ private:
 
        virtual void OnResize(int width, int height);
 
-       void RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
-       void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
-       void RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+private:
+       enum MenuItem {
+               MENU_ITEM_ITEM,
+               MENU_ITEM_SPELL,
+               MENU_ITEM_CAPSULE,
+               MENU_ITEM_EQUIP,
+               MENU_ITEM_STATUS,
+               MENU_ITEM_CHANGE,
+               MENU_ITEM_CONFIG,
+               MENU_ITEM_SCENARIO,
+       };
 
 private:
        HeroStatus status[4];
+       geometry::Vector<int> statusPositions[4];
        common::GameConfig *game;
+       graphics::Menu<int> mainMenu;
 
 };