From: Daniel Karbach Date: Tue, 20 Nov 2012 19:34:51 +0000 (+0100) Subject: added action menu to equipment menu X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=a66a2c0b644eed7535f5188d44f6065c0105957d;p=l2e.git added action menu to equipment menu --- diff --git a/src/main.cpp b/src/main.cpp index df5ab7a..44ed13a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -424,7 +424,7 @@ int main(int argc, char **argv) { graphics::MenuProperties equipmentMenuProperties; equipmentMenuProperties.cols = 1; - equipmentMenuProperties.rows = 5; + equipmentMenuProperties.rows = 6; equipmentMenuProperties.charsPerEntry = 12; equipmentMenuProperties.rowGap = 16; equipmentMenuProperties.cursor = &menuCursor; @@ -433,6 +433,12 @@ int main(int argc, char **argv) { equipmentMenuProperties.iconSpace = 16; menuResources.equipmentMenuProperties = &equipmentMenuProperties; + menuResources.equipMenuEquipLabel = "EQUIP"; + menuResources.equipMenuStrongestLabel = "STRONGEST"; + menuResources.equipMenuRemoveLabel = "REMOVE"; + menuResources.equipMenuRemoveAllLabel = "REMOVE ALL"; + menuResources.equipMenuDropLabel = "DROP"; + InitScreen screen(width, height); app::State *state(0); diff --git a/src/menu/EquipMenu.cpp b/src/menu/EquipMenu.cpp index da24f77..c604155 100644 --- a/src/menu/EquipMenu.cpp +++ b/src/menu/EquipMenu.cpp @@ -87,12 +87,16 @@ void EquipMenu::Render(SDL_Surface *screen) { Vector equipOffset( 17 * parent->Res().statusFont->CharWidth(), 4 * parent->Res().statusFont->CharHeight() - parent->Res().statusFont->CharHeight() / 8); + Vector menuOffset( + 15 * parent->Res().statusFont->CharWidth(), + 17 * parent->Res().statusFont->CharHeight() - parent->Res().statusFont->CharHeight() / 8); parent->RenderBackground(screen); parent->Res().shoulderNav->Draw(screen, offset + shoulderNavOffset); RenderStatus(screen, offset + parent->StatusOffset(0)); RenderStats(screen, offset + statsOffset); - RenderEquipmentMenu(screen, equipOffset); + RenderEquipmentMenu(screen, offset + equipOffset); + RenderActionMenu(screen, offset + menuOffset); } int EquipMenu::Width() const { @@ -146,7 +150,12 @@ void EquipMenu::RenderEquipmentMenu(SDL_Surface *screen, const Vector &offs } void EquipMenu::RenderActionMenu(SDL_Surface *screen, const Vector &offset) const { + const Font &font(*parent->Res().statusFont); + const Frame &frame(*parent->Res().statusFrame); + const Vector menuOffset(3 * font.CharWidth(), font.CharHeight() + font.CharHeight() / 2); + frame.Draw(screen, offset, 15 * font.CharWidth(), 10 * font.CharHeight()); + actionMenu.Draw(screen, offset + menuOffset); } void EquipMenu::RenderInventoryMenu(SDL_Surface *screen, const Vector &offset) const {