From: Daniel Karbach Date: Wed, 31 Oct 2012 21:47:58 +0000 (+0100) Subject: added ikari level to status menu X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=b9448180c2cf0ecc75865e57d83db63d4fe3e8a5;p=l2e.git added ikari level to status menu --- diff --git a/src/menu/StatusMenu.cpp b/src/menu/StatusMenu.cpp index aea11b9..b037703 100644 --- a/src/menu/StatusMenu.cpp +++ b/src/menu/StatusMenu.cpp @@ -91,6 +91,9 @@ void StatusMenu::Render(SDL_Surface *screen) { Vector nextLevelOffset( 11 * parent->Res().statusFont->CharWidth(), 19 * parent->Res().statusFont->CharHeight() - parent->Res().statusFont->CharHeight() / 8); + Vector ikariOffset( + 17 * parent->Res().statusFont->CharWidth(), + 17 * parent->Res().statusFont->CharHeight() - parent->Res().statusFont->CharHeight() / 8); parent->RenderBackground(screen); parent->Res().shoulderNav->Draw(screen, offset + shoulderNavOffset); @@ -99,6 +102,7 @@ void StatusMenu::Render(SDL_Surface *screen) { RenderEquipment(screen, offset + equipOffset); RenderExperience(screen, experienceOffset); RenderNextLevel(screen, nextLevelOffset); + RenderIkari(screen, ikariOffset); } int StatusMenu::Width() const { @@ -199,6 +203,17 @@ void StatusMenu::RenderNextLevel(SDL_Surface *screen, const geometry::Vector &offset) const { + const Font &font(*parent->Res().statusFont); + font.DrawString(parent->Res().ipLabel, screen, offset, 5); + + Vector numberOffset(offset.X() + 5 * font.CharWidth(), offset.Y()); + font.DrawNumber(GetHero().RelativeIP(100), screen, numberOffset, 3); + + Vector percentOffset(offset.X() + 8 * font.CharWidth(), offset.Y()); + font.DrawChar('%', screen, percentOffset); +} + void StatusMenu::NextHero() { cursor = (cursor + 1) % parent->Game().state->partySize; diff --git a/src/menu/StatusMenu.h b/src/menu/StatusMenu.h index f6bcb29..40fac6b 100644 --- a/src/menu/StatusMenu.h +++ b/src/menu/StatusMenu.h @@ -52,6 +52,7 @@ private: void RenderExperience(SDL_Surface *screen, const geometry::Vector &offset) const; /// @param offset the top right corner! void RenderNextLevel(SDL_Surface *screen, const geometry::Vector &offset) const; + void RenderIkari(SDL_Surface *screen, const geometry::Vector &offset) const; private: PartyMenu *parent;