]> git.localhorst.tv Git - l2e.git/commitdiff
fixed position of menu hero cursor
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 21 Jan 2013 20:14:31 +0000 (21:14 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 21 Jan 2013 20:14:31 +0000 (21:14 +0100)
src/menu/SelectHero.cpp

index ffc21a3bbc1a5875f39ffb87ad915ea33f4eb79a..597faead6b2ccc7a24b6526f3ff573f3dec21430 100644 (file)
@@ -118,10 +118,11 @@ void SelectHero::Render(SDL_Surface *screen) {
 }
 
 void SelectHero::RenderCursor(SDL_Surface *screen) const {
+       const Vector<int> offset((screen->w - partyMenu->Width()) / 2, (screen->h - partyMenu->Height()) / 2);
        Vector<int> position(
                        0, Game().state->party[cursor]->BattleSprite()->Height());
        position += partyMenu->StatusOffset(cursor);
-       Res().heroCursor->Draw(screen, position);
+       Res().heroCursor->Draw(screen, position + offset);
 }
 
 }