]> git.localhorst.tv Git - l2e.git/blob - src/menu/ChangeHero.h
6bb5f313bc2e69fe1a8405a2faeaf4ff1ff5a553
[l2e.git] / src / menu / ChangeHero.h
1 /*
2  * ChangeHero.h
3  *
4  *  Created on: Nov 4, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_CHANGEHERO_H_
9 #define MENU_CHANGEHERO_H_
10
11 #include "fwd.h"
12 #include "../app/State.h"
13 #include "../geometry/Vector.h"
14
15 #include <SDL.h>
16
17 namespace menu {
18
19 class ChangeHero
20 : public app::State {
21
22 public:
23         explicit ChangeHero(PartyMenu *parent);
24
25 public:
26         virtual void HandleEvents(const app::Input &);
27         virtual void UpdateWorld(float deltaT);
28         virtual void Render(SDL_Surface *);
29
30 public:
31         int Width() const;
32         int Height() const;
33
34 private:
35         virtual void OnEnterState(SDL_Surface *screen);
36         virtual void OnExitState(SDL_Surface *screen);
37         virtual void OnResumeState(SDL_Surface *screen);
38         virtual void OnPauseState(SDL_Surface *screen);
39
40         virtual void OnResize(int width, int height);
41
42         void SelectedHero(int index);
43
44         void RenderHighlight(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
45
46         static void OnHeroSelected(void *, int);
47
48 private:
49         PartyMenu *parent;
50         SDL_Surface *highlight;
51         int selection;
52
53 };
54
55 }
56
57 #endif /* MENU_CHANGEHERO_H_ */