X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FHeroStatus.cpp;fp=src%2Fmenu%2FHeroStatus.cpp;h=6f8b341c6a754a4facbe628a15c2ea1902aa9107;hb=aedf4ae020e3c811341df79ceae63ca56fb7ce83;hp=e84327ebddb8e8718724e90e6169c614d8aa7601;hpb=7e59a87ac7caf96ffa38f2595581a6009a20339a;p=l2e.git diff --git a/src/menu/HeroStatus.cpp b/src/menu/HeroStatus.cpp index e84327e..6f8b341 100644 --- a/src/menu/HeroStatus.cpp +++ b/src/menu/HeroStatus.cpp @@ -28,7 +28,7 @@ HeroStatus::~HeroStatus() { int HeroStatus::Width() const { - return hero->BattleSprite()->Width() + res->normalFont->CharWidth() * 10; + return hero->BattleSprite()->Width() + res->statusFont->CharWidth() * 10; } int HeroStatus::Height() const { @@ -44,39 +44,39 @@ void HeroStatus::Render(SDL_Surface *screen, const Vector &offset) const { // for some reason, fonts are shifted by one pixel in the original Vector nameOffset( hero->BattleSprite()->Width(), - res->normalFont->CharHeight() * 7 / 8); + res->statusFont->CharHeight() * 7 / 8); nameOffset += position + offset; - res->normalFont->DrawString(hero->Name(), screen, nameOffset, 5); + res->statusFont->DrawString(hero->Name(), screen, nameOffset, 5); - Vector levelLabelOffset(nameOffset.X() + 6 * res->normalFont->CharWidth(), nameOffset.Y()); + Vector levelLabelOffset(nameOffset.X() + 6 * res->statusFont->CharWidth(), nameOffset.Y()); res->statusLabels->Draw(screen, levelLabelOffset, 0, 0); - Vector levelOffset(levelLabelOffset.X() + 2 * res->normalFont->CharWidth(), levelLabelOffset.Y()); - res->normalFont->DrawNumber(hero->Level(), screen, levelOffset, 2); + Vector levelOffset(levelLabelOffset.X() + 2 * res->statusFont->CharWidth(), levelLabelOffset.Y()); + res->statusFont->DrawNumber(hero->Level(), screen, levelOffset, 2); - Vector healthLabelOffset(nameOffset.X(), nameOffset.Y() + res->normalFont->CharHeight()); + Vector healthLabelOffset(nameOffset.X(), nameOffset.Y() + res->statusFont->CharHeight()); res->statusLabels->Draw(screen, healthLabelOffset, 0, 1); - Vector healthOffset(nameOffset.X() + 3 * res->normalFont->CharWidth(), nameOffset.Y() + res->normalFont->CharHeight()); - res->normalFont->DrawNumber(hero->Health(), screen, healthOffset, 3); + Vector healthOffset(nameOffset.X() + 3 * res->statusFont->CharWidth(), nameOffset.Y() + res->statusFont->CharHeight()); + res->statusFont->DrawNumber(hero->Health(), screen, healthOffset, 3); - Vector healthSeparatorOffset(healthOffset.X() + 3 * res->normalFont->CharWidth(), healthOffset.Y()); - res->normalFont->DrawChar('/', screen, healthSeparatorOffset); + Vector healthSeparatorOffset(healthOffset.X() + 3 * res->statusFont->CharWidth(), healthOffset.Y()); + res->statusFont->DrawChar('/', screen, healthSeparatorOffset); - Vector maxHealthOffset(healthSeparatorOffset.X() + res->normalFont->CharWidth(), healthOffset.Y()); - res->normalFont->DrawNumber(hero->MaxHealth(), screen, maxHealthOffset, 3); + Vector maxHealthOffset(healthSeparatorOffset.X() + res->statusFont->CharWidth(), healthOffset.Y()); + res->statusFont->DrawNumber(hero->MaxHealth(), screen, maxHealthOffset, 3); - Vector manaLabelOffset(healthLabelOffset.X(), healthLabelOffset.Y() + res->normalFont->CharHeight()); + Vector manaLabelOffset(healthLabelOffset.X(), healthLabelOffset.Y() + res->statusFont->CharHeight()); res->statusLabels->Draw(screen, manaLabelOffset, 0, 2); - Vector manaOffset(healthOffset.X(), healthOffset.Y() + res->normalFont->CharHeight()); - res->normalFont->DrawNumber(hero->Mana(), screen, manaOffset, 3); + Vector manaOffset(healthOffset.X(), healthOffset.Y() + res->statusFont->CharHeight()); + res->statusFont->DrawNumber(hero->Mana(), screen, manaOffset, 3); Vector manaSeparatorOffset(healthSeparatorOffset.X(), manaOffset.Y()); - res->normalFont->DrawChar('/', screen, manaSeparatorOffset); + res->statusFont->DrawChar('/', screen, manaSeparatorOffset); Vector maxManaOffset(maxHealthOffset.X(), manaOffset.Y()); - res->normalFont->DrawNumber(hero->MaxMana(), screen, maxManaOffset, 3); + res->statusFont->DrawNumber(hero->MaxMana(), screen, maxManaOffset, 3); } }