X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FEquipMenu.h;fp=src%2Fmenu%2FEquipMenu.h;h=39380dcccd2d597ad2699754a069d86d4d9bd0cf;hb=f2abfc21845c29024ce2478f95429801e91ef8e8;hp=0000000000000000000000000000000000000000;hpb=aacd6d095d1e200cee6033fbf8221bea9a6c3112;p=l2e.git diff --git a/src/menu/EquipMenu.h b/src/menu/EquipMenu.h new file mode 100644 index 0000000..39380dc --- /dev/null +++ b/src/menu/EquipMenu.h @@ -0,0 +1,74 @@ +/* + * EquipMenu.h + * + * Created on: Nov 18, 2012 + * Author: holy + */ + +#ifndef MENU_EQUIPMENU_H_ +#define MENU_EQUIPMENU_H_ + +#include "fwd.h" +#include "../app/State.h" +#include "../common/fwd.h" +#include "../geometry/Vector.h" +#include "../graphics/Menu.h" + +namespace menu { + +class EquipMenu +: public app::State { + +public: + EquipMenu(PartyMenu *parent, int heroIndex); + +public: + virtual void HandleEvents(const app::Input &); + virtual void UpdateWorld(float deltaT); + virtual void Render(SDL_Surface *); + +public: + int Width() const; + int Height() const; + +private: + virtual void OnEnterState(SDL_Surface *screen); + virtual void OnExitState(SDL_Surface *screen); + virtual void OnResumeState(SDL_Surface *screen); + virtual void OnPauseState(SDL_Surface *screen); + + virtual void OnResize(int width, int height); + + void NextHero(); + void PreviousHero(); + + const common::Hero &GetHero() const; + + void LoadEquipment(); + + void RenderStatus(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderStats(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderStatsLine(const char *label, int number, SDL_Surface *screen, const geometry::Vector &position) const; + void RenderEquipmentMenu(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderActionMenu(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderInventoryMenu(SDL_Surface *screen, const geometry::Vector &offset) const; + +private: + PartyMenu *parent; + int cursor; + enum Choice { + CHOICE_EQUIP, + CHOICE_STRONGEST, + CHOICE_REMOVE, + CHOICE_REMOVE_ALL, + CHOICE_DROP, + }; + graphics::Menu actionMenu; + graphics::Menu equipmentMenu; + graphics::Menu inventoryMenu; + +}; + +} + +#endif /* MENU_EQUIPMENU_H_ */