X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHeroTag.cpp;fp=src%2Fbattle%2FHeroTag.cpp;h=531031f8e93868b2cb8143b40c650b6e424d6a0f;hb=e16f1b77f9d7f09d232cfe34e4fc8b4be06f571d;hp=01cee4485f463ed1c68fce599c7fb6e47f0aa08e;hpb=2f2dad58f3b9f7c98cf20211929ff31f5ebf5e5f;p=l2e.git diff --git a/src/battle/HeroTag.cpp b/src/battle/HeroTag.cpp index 01cee44..531031f 100644 --- a/src/battle/HeroTag.cpp +++ b/src/battle/HeroTag.cpp @@ -26,6 +26,7 @@ void HeroTag::Render(SDL_Surface *screen, int width, int height, Point posi // frame const Frame *frame(active ? res->activeHeroTagFrame : res->heroTagFrame); Vector frameOffset(frame->BorderWidth(), frame->BorderHeight()); + Vector alignOffset(align == LEFT ? 4 * res->heroTagFont->CharWidth() : 0, 0); frame->Draw(screen, position, width, height); int yOffset((height - hero->Sprite()->Height()) / 2); @@ -74,6 +75,9 @@ void HeroTag::Render(SDL_Surface *screen, int width, int height, Point posi Vector manaNumberOffset(labelX + res->heroTagLabels->Width(), manaLabelOffset.Y()); res->heroTagFont->DrawNumber(hero->Mana(), screen, position + manaNumberOffset, 3); + // name + res->normalFont->DrawString(hero->Name(), screen, position + frameOffset + alignOffset, 5); + // hero Vector heroOffset( (align == LEFT) ? yOffset : width - hero->Sprite()->Width() - yOffset,