namespace battle {
-void SelectTarget::EnterState(Application &c, SDL_Surface *screen) {
- ctrl = &c;
+void SelectTarget::OnEnterState(SDL_Surface *screen) {
+
}
-void SelectTarget::ExitState(Application &c, SDL_Surface *screen) {
- ctrl = 0;
+void SelectTarget::OnExitState(SDL_Surface *screen) {
+
}
-void SelectTarget::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnResumeState(SDL_Surface *screen) {
}
-void SelectTarget::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SelectTarget::OnPauseState(SDL_Surface *screen) {
}
-void SelectTarget::Resize(int width, int height) {
+void SelectTarget::OnResize(int width, int height) {
}
void SelectTarget::HandleEvents(const Input &input) {
if (input.JustPressed(Input::ACTION_A)) {
if (selection->CurrentIsSelected()) {
- ctrl->PopState(); // return control to parent
+ Ctrl().PopState(); // return control to parent
} else {
selection->Select();
if (selection->SelectSingle()) {
- ctrl->PopState(); // return control to parent
+ Ctrl().PopState(); // return control to parent
}
}
}
selection->Unselect();
} else {
selection->UnselectAll();
- ctrl->PopState(); // return control to parent
+ Ctrl().PopState(); // return control to parent
}
}