X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FHeroStatus.cpp;fp=src%2Fmenu%2FHeroStatus.cpp;h=2d038b1a3c69b247f661b4fe807c72c2a8ee5def;hb=243cb7d922fe888be8d18241de138ad5949de430;hp=6f8b341c6a754a4facbe628a15c2ea1902aa9107;hpb=bba1ac05e8c1854dc61bd737d228d9bc18bbb6ad;p=l2e.git diff --git a/src/menu/HeroStatus.cpp b/src/menu/HeroStatus.cpp index 6f8b341..2d038b1 100644 --- a/src/menu/HeroStatus.cpp +++ b/src/menu/HeroStatus.cpp @@ -28,24 +28,24 @@ HeroStatus::~HeroStatus() { int HeroStatus::Width() const { - return hero->BattleSprite()->Width() + res->statusFont->CharWidth() * 10; + return hero->BattleSprite()->Width() + res->statusFont->CharWidth() * 11; } int HeroStatus::Height() const { - return hero->BattleSprite()->Height(); + return hero->BattleSprite()->Height() + res->statusFont->CharWidth(); } void HeroStatus::Render(SDL_Surface *screen, const Vector &offset) const { if (!hero) return; - hero->BattleSprite()->Draw(screen, position + offset, 0, 0); + hero->BattleSprite()->Draw(screen, offset, 0, 0); // for some reason, fonts are shifted by one pixel in the original Vector nameOffset( hero->BattleSprite()->Width(), res->statusFont->CharHeight() * 7 / 8); - nameOffset += position + offset; + nameOffset += offset; res->statusFont->DrawString(hero->Name(), screen, nameOffset, 5); Vector levelLabelOffset(nameOffset.X() + 6 * res->statusFont->CharWidth(), nameOffset.Y());