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