X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FCapsuleFeedMenu.h;fp=src%2Fmenu%2FCapsuleFeedMenu.h;h=8c75edd11e1d22712190458bc1c316971af90839;hb=7a14d357d9d05c2bac1efcdcf57365a4ce13729a;hp=0000000000000000000000000000000000000000;hpb=7f0a586b8238c7093a8942ff5b5c4122edd386fc;p=l2e.git diff --git a/src/menu/CapsuleFeedMenu.h b/src/menu/CapsuleFeedMenu.h new file mode 100644 index 0000000..8c75edd --- /dev/null +++ b/src/menu/CapsuleFeedMenu.h @@ -0,0 +1,60 @@ +#ifndef MENU_CAPSULEFEEDMENU_H_ +#define MENU_CAPSULEFEEDMENU_H_ + +#include "fwd.h" +#include "../app/State.h" +#include "../common/fwd.h" +#include "../geometry/Vector.h" +#include "../graphics/Menu.h" + +namespace menu { + +class CapsuleMenu; + +class CapsuleFeedMenu +: public app::State { + +public: + explicit CapsuleFeedMenu(CapsuleMenu *parent); + +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); + + const common::Capsule &GetCapsule() const; + + void LoadInventory(); + + void RenderName(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderSprite(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderHunger(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderMenu(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderItems(SDL_Surface *screen, const geometry::Vector &offset) const; + +private: + CapsuleMenu *parent; + enum Choice { + CHOICE_SELECT, + CHOICE_SORT, + }; + graphics::Menu menu; + graphics::Menu itemMenu; + +}; + +} + +#endif /* MENU_CAPSULEFEEDMENU_H_ */