]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SelectTarget.h
4d53c3c76f76491abdb8e2815e5ae8e43d217300
[l2e.git] / src / battle / states / SelectTarget.h
1 #ifndef BATTLE_SELECTTARGET_H_
2 #define BATTLE_SELECTTARGET_H_
3
4 namespace battle {
5         class BattleState;
6         class SelectAttackType;
7         class TargetSelection;
8 }
9 namespace math {
10         template<class>
11         class Vector;
12 }
13 namespace graphics {
14         class Sprite;
15 }
16
17 #include "../../app/State.h"
18
19 namespace battle {
20
21 class SelectTarget
22 : public app::State {
23
24 public:
25         SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon)
26         : battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
27
28 public:
29         virtual void HandleEvents(const app::Input &);
30         virtual void UpdateWorld(Uint32 deltaT);
31         virtual void Render(SDL_Surface *);
32
33 private:
34         virtual void OnEnterState(SDL_Surface *screen);
35         virtual void OnExitState(SDL_Surface *screen);
36         virtual void OnResumeState(SDL_Surface *screen);
37         virtual void OnPauseState(SDL_Surface *screen);
38
39         virtual void OnResize(int width, int height);
40
41 private:
42         void RenderCursors(SDL_Surface *screen, const math::Vector<int> &offset);
43
44 private:
45         BattleState *battle;
46         SelectAttackType *parent;
47         TargetSelection *selection;
48         const graphics::Sprite *cursorIcon;
49         bool flipFlop;
50
51 };
52
53 }
54
55 #endif