X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectTarget.cpp;h=8fe31cd60dad1e1953c3460d86f4998870158969;hb=e27fcf693589ede18b753d5f64f9dfecfe6344bd;hp=9c50991bf00c26b9deb34acc83b61f3b4f4b7152;hpb=4356621a6440ac915dd0d2dfc70d2c17c3ff321a;p=l2e.git diff --git a/src/battle/states/SelectTarget.cpp b/src/battle/states/SelectTarget.cpp index 9c50991..8fe31cd 100644 --- a/src/battle/states/SelectTarget.cpp +++ b/src/battle/states/SelectTarget.cpp @@ -44,7 +44,7 @@ void SelectTarget::Resize(int width, int height) { } -void SelectTarget::HandleInput(const Input &input) { +void SelectTarget::HandleEvents(const Input &input) { if (input.JustPressed(Input::ACTION_A)) { if (selection->CurrentIsSelected()) { ctrl->PopState(); // return control to parent @@ -99,7 +99,7 @@ void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector::size_type i(0), end(battle->Heroes().size()); i < end; ++i) { + for (int i(0), end(battle->NumHeroes()); i < end; ++i) { Vector positionCorrection(cursorIcon->Width() / 2, battle->HeroTagAt(i).HeroSprite()->Height() - cursorIcon->Height() / 2); // indicator offsets are inverted for heroes positionCorrection -= cursorOffset;