]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/PartyMenu.cpp
added frames for status menu
[l2e.git] / src / menu / PartyMenu.cpp
index f230358b1de4c1e1c6fdd20ab61c6efb51ffb0ca..4949bfaa73453a546062bf121de197f287794077 100644 (file)
@@ -14,6 +14,7 @@
 #include "../common/GameState.h"
 #include "../geometry/Vector.h"
 #include "../graphics/Font.h"
+#include "../graphics/Frame.h"
 #include "../graphics/Texture.h"
 
 using app::Input;
@@ -73,7 +74,9 @@ void PartyMenu::UpdateWorld(float deltaT) {
 
 void PartyMenu::Render(SDL_Surface *screen) {
        Res().menubg->Render(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
-       RenderHeros(screen, Vector<int>());
+       RenderHeros(screen, Vector<int>(Res().normalFont->CharWidth(), 2 * Res().normalFont->CharHeight()));
+       RenderMenu(screen, Vector<int>(8 * Res().normalFont->CharWidth(), 13 * Res().normalFont->CharHeight() + Res().normalFont->CharHeight() / 8));
+       RenderInfo(screen, Vector<int>(14 * Res().normalFont->CharWidth(), 21 * Res().normalFont->CharHeight() + Res().normalFont->CharHeight() / 8));
 }
 
 void PartyMenu::RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &offset) const {
@@ -82,6 +85,14 @@ void PartyMenu::RenderHeros(SDL_Surface *screen, const geometry::Vector<int> &of
        }
 }
 
+void PartyMenu::RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const {
+       Res().statusFrame->Draw(screen, offset, 23 * Res().normalFont->CharWidth(), 8 * Res().normalFont->CharHeight());
+}
+
+void PartyMenu::RenderInfo(SDL_Surface *screen, const geometry::Vector<int> &offset) const {
+       Res().statusFrame->Draw(screen, offset, 17 * Res().normalFont->CharWidth(), 5 * Res().normalFont->CharHeight());
+}
+
 
 Resources &PartyMenu::Res() {
        return *game->menuResources;