X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FPartyMenu.h;h=f915d30e4a45d2cc3950a7f7fe43ac81f0ef7211;hb=37f46a0eb5ddbf9e3de672cf6da97605e41bd1f4;hp=2172bfccc536e40bb339a052322857d21267f630;hpb=57a75f13e98f4b5d311c2d3b9d9ff637120c5ee2;p=l2e.git diff --git a/src/menu/PartyMenu.h b/src/menu/PartyMenu.h index 2172bfc..f915d30 100644 --- a/src/menu/PartyMenu.h +++ b/src/menu/PartyMenu.h @@ -13,6 +13,7 @@ #include "../app/State.h" #include "../common/fwd.h" #include "../geometry/Vector.h" +#include "../graphics/Menu.h" namespace menu { @@ -29,9 +30,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 &offset) const; + void RenderMenu(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderInfo(SDL_Surface *screen, const geometry::Vector &offset) const; + + geometry::Vector 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,11 +59,23 @@ private: virtual void OnResize(int width, int height); - void RenderHeros(SDL_Surface *screen, const geometry::Vector &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 statusPositions[4]; common::GameConfig *game; + graphics::Menu mainMenu; };