]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectMoveAction.cpp
reworked PerformAttacks
[l2e.git] / src / battle / states / SelectMoveAction.cpp
index de8e97b4db066fca0b316cfcc767094470f8bc89..8aa49067df121ee223784ddfaec6d3faca050d15 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "SelectMoveAction.h"
 
+#include "RunState.h"
 #include "SelectAttackType.h"
 #include "SwapHeroes.h"
 #include "../BattleState.h"
@@ -44,7 +45,7 @@ void SelectMoveAction::Resize(int width, int height) {
 }
 
 
-void SelectMoveAction::HandleInput(const Input &input) {
+void SelectMoveAction::HandleEvents(const Input &input) {
        if (input.IsDown(Input::PAD_UP)) {
                battle->GetMoveMenu().Select(MoveMenu::CHANGE);
        } else if (input.IsDown(Input::PAD_DOWN)) {
@@ -63,7 +64,7 @@ void SelectMoveAction::HandleInput(const Input &input) {
                                ctrl->PushState(new SwapHeroes(battle, this));
                                break;
                        case MoveMenu::RUN:
-                               // TODO: switch to run state
+                               ctrl->ChangeState(new RunState(battle));
                                break;
                }
        }