X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectMoveAction.cpp;h=de8e97b4db066fca0b316cfcc767094470f8bc89;hb=bce16ed519add0d5398d504d2554395c43c74571;hp=bee880be88c418135939da8a01c0ee9336eaa792;hpb=2a0eca649009f78028db286a67a532429cab5b88;p=l2e.git diff --git a/src/battle/states/SelectMoveAction.cpp b/src/battle/states/SelectMoveAction.cpp index bee880b..de8e97b 100644 --- a/src/battle/states/SelectMoveAction.cpp +++ b/src/battle/states/SelectMoveAction.cpp @@ -8,6 +8,7 @@ #include "SelectMoveAction.h" #include "SelectAttackType.h" +#include "SwapHeroes.h" #include "../BattleState.h" #include "../MoveMenu.h" #include "../../app/Application.h" @@ -43,7 +44,7 @@ void SelectMoveAction::Resize(int width, int height) { } -void SelectMoveAction::HandleInput(const app::Input &input) { +void SelectMoveAction::HandleInput(const Input &input) { if (input.IsDown(Input::PAD_UP)) { battle->GetMoveMenu().Select(MoveMenu::CHANGE); } else if (input.IsDown(Input::PAD_DOWN)) { @@ -59,7 +60,7 @@ void SelectMoveAction::HandleInput(const app::Input &input) { battle->NextHero(); break; case MoveMenu::CHANGE: - // TODO: switch to change state + ctrl->PushState(new SwapHeroes(battle, this)); break; case MoveMenu::RUN: // TODO: switch to run state @@ -83,7 +84,7 @@ void SelectMoveAction::Render(SDL_Surface *screen) { void SelectMoveAction::RenderMenu(SDL_Surface *screen, const Vector &offset) { Point position( (battle->BackgroundWidth() - battle->GetMoveMenu().Width()) / 2, - (battle->BackgroundHeight() * 3 / 4) - (battle->GetMoveMenu().Height() / 2)); + battle->BackgroundHeight() - battle->GetMoveMenu().Height() - battle->GetMoveMenu().Height() / 2); battle->GetMoveMenu().Render(screen, position + offset); }