4 * Created on: Oct 21, 2012
8 #ifndef MENU_PARTYMENU_H_
9 #define MENU_PARTYMENU_H_
12 #include "HeroStatus.h"
13 #include "../app/State.h"
14 #include "../common/fwd.h"
15 #include "../geometry/Vector.h"
16 #include "../graphics/Menu.h"
24 explicit PartyMenu(common::GameConfig *);
28 virtual void HandleEvents(const app::Input &);
29 virtual void UpdateWorld(float deltaT);
30 virtual void Render(SDL_Surface *);
33 common::GameConfig &Game() { return *game; }
34 const common::GameConfig &Game() const { return *game; }
36 const Resources &Res() const;
42 void RenderBackground(SDL_Surface *screen) const;
43 void RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
44 void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
45 void RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
47 geometry::Vector<int> StatusOffset(int index) const;
48 const HeroStatus &GetHeroStatus(int index) const { return status[index]; }
50 static void OnStatusSelect(void *, int);
53 virtual void OnEnterState(SDL_Surface *screen);
54 virtual void OnExitState(SDL_Surface *screen);
55 virtual void OnResumeState(SDL_Surface *screen);
56 virtual void OnPauseState(SDL_Surface *screen);
58 virtual void OnResize(int width, int height);
74 geometry::Vector<int> statusPositions[4];
75 common::GameConfig *game;
76 graphics::Menu<int> mainMenu;
82 #endif /* MENU_PARTYMENU_H_ */