]> git.localhorst.tv Git - l2e.git/blob - src/menu/PartyMenu.h
5baaf69ac9635c8219e389fb380ed8a160830e77
[l2e.git] / src / menu / PartyMenu.h
1 /*
2  * PartyMenu.h
3  *
4  *  Created on: Oct 21, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_PARTYMENU_H_
9 #define MENU_PARTYMENU_H_
10
11 #include "fwd.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"
17
18 namespace menu {
19
20 class PartyMenu
21 : public app::State {
22
23 public:
24         explicit PartyMenu(common::GameConfig *);
25         virtual ~PartyMenu();
26
27 public:
28         virtual void HandleEvents(const app::Input &);
29         virtual void UpdateWorld(float deltaT);
30         virtual void Render(SDL_Surface *);
31
32 public:
33         Resources &Res();
34         const Resources &Res() const;
35
36 private:
37         virtual void OnEnterState(SDL_Surface *screen);
38         virtual void OnExitState(SDL_Surface *screen);
39         virtual void OnResumeState(SDL_Surface *screen);
40         virtual void OnPauseState(SDL_Surface *screen);
41
42         virtual void OnResize(int width, int height);
43
44         void RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
45         void RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
46         void RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
47
48 private:
49         HeroStatus status[4];
50         common::GameConfig *game;
51         graphics::Menu<int> mainMenu;
52
53 };
54
55 }
56
57 #endif /* MENU_PARTYMENU_H_ */