]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SelectTarget.h
added loading callback for type descriptions
[l2e.git] / src / battle / states / SelectTarget.h
1 /*
2  * SelectTarget.h
3  *
4  *  Created on: Aug 9, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_SELECTTARGET_H_
9 #define BATTLE_SELECTTARGET_H_
10
11 #include "../fwd.h"
12 #include "../../app/State.h"
13 #include "../../geometry/Vector.h"
14 #include "../../graphics/fwd.h"
15
16 namespace battle {
17
18 class SelectTarget
19 : public app::State {
20
21 public:
22         SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon)
23         : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
24
25 public:
26         virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
27         virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
28         virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
29         virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
30
31         virtual void Resize(int width, int height);
32
33         virtual void HandleEvents(const app::Input &);
34         virtual void UpdateWorld(float deltaT);
35         virtual void Render(SDL_Surface *);
36
37 private:
38         void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
39
40 private:
41         app::Application *ctrl;
42         BattleState *battle;
43         SelectAttackType *parent;
44         TargetSelection *selection;
45         const graphics::Sprite *cursorIcon;
46         bool flipFlop;
47
48 };
49
50 }
51
52 #endif /* BATTLE_SELECTTARGET_H_ */