From 860808a3bbd079e0785c1cffe62a40ca7961f1e4 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 3 Dec 2011 10:02:33 +0000 Subject: [PATCH] - fixed UI to fit most language text comfortably --- .../glest_game/menu/menu_state_connected_game.cpp | 12 ++++++------ source/glest_game/menu/menu_state_custom_game.cpp | 6 +++--- source/glest_game/menu/menu_state_join_game.cpp | 2 +- source/glest_game/menu/menu_state_new_game.cpp | 13 +++++++------ source/glest_game/menu/menu_state_options.cpp | 10 +++++----- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index cfcf6c9a..64f5c21f 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -131,7 +131,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM //state labelStatus.registerGraphicComponent(containerName,"labelStatus"); - labelStatus.init(350, networkHeadPos+30); + labelStatus.init(30, networkHeadPos); labelStatus.setText(""); labelInfo.registerGraphicComponent(containerName,"labelInfo"); @@ -148,9 +148,6 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM labelDataSynchInfo.setFont3D(CoreData::getInstance().getMenuFontBig3D()); //create - buttonDisconnect.registerGraphicComponent(containerName,"buttonDisconnect"); - buttonDisconnect.init(350, 180, 125); - buttonCancelDownloads.registerGraphicComponent(containerName,"buttonCancelDownloads"); buttonCancelDownloads.init(10, 150, 125); buttonCancelDownloads.setText(lang.get("CancelDownloads")); @@ -440,12 +437,15 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM listBoxMap.setItems(formattedMapFiles); buttonPlayNow.registerGraphicComponent(containerName,"buttonPlayNow"); - buttonPlayNow.init(200, 180, 125); + buttonPlayNow.init(220, 180, 125); buttonPlayNow.setText(lang.get("PlayNow")); buttonPlayNow.setVisible(false); + buttonDisconnect.registerGraphicComponent(containerName,"buttonDisconnect"); + buttonDisconnect.init(350, 180, 125); + buttonRestoreLastSettings.registerGraphicComponent(containerName,"buttonRestoreLastSettings"); - buttonRestoreLastSettings.init(500, 180, 200); + buttonRestoreLastSettings.init(480, 180, 220); buttonRestoreLastSettings.setText(lang.get("ReloadLastGameSettings")); chatManager.init(&console, -1,true); diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 2dcb8fec..fa1bbcb1 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -145,16 +145,16 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, //create buttonReturn.registerGraphicComponent(containerName,"buttonReturn"); - buttonReturn.init(250, 180, 125); + buttonReturn.init(240, 180, 125); buttonClearBlockedPlayers.registerGraphicComponent(containerName,"buttonClearBlockedPlayers"); buttonClearBlockedPlayers.init(427, 590, 125); buttonRestoreLastSettings.registerGraphicComponent(containerName,"buttonRestoreLastSettings"); - buttonRestoreLastSettings.init(250+130, 180, 200); + buttonRestoreLastSettings.init(250+130, 180, 220); buttonPlayNow.registerGraphicComponent(containerName,"buttonPlayNow"); - buttonPlayNow.init(250+130+205, 180, 125); + buttonPlayNow.init(250+130+235, 180, 125); int labelOffset=23; int setupPos=590; diff --git a/source/glest_game/menu/menu_state_join_game.cpp b/source/glest_game/menu/menu_state_join_game.cpp index 0048b2c0..11c8a58b 100644 --- a/source/glest_game/menu/menu_state_join_game.cpp +++ b/source/glest_game/menu/menu_state_join_game.cpp @@ -80,7 +80,7 @@ MenuStateJoinGame::MenuStateJoinGame(Program *program, MainMenu *mainMenu, bool buttonCreateGame.setText(lang.get("HostGame")); buttonAutoFindServers.registerGraphicComponent(containerName,"buttonAutoFindServers"); - buttonAutoFindServers.init(595, 300, 125); + buttonAutoFindServers.init(595, 300, 225); buttonAutoFindServers.setText(lang.get("FindLANGames")); buttonAutoFindServers.setEnabled(true); diff --git a/source/glest_game/menu/menu_state_new_game.cpp b/source/glest_game/menu/menu_state_new_game.cpp index de7b0d97..f26b033a 100644 --- a/source/glest_game/menu/menu_state_new_game.cpp +++ b/source/glest_game/menu/menu_state_new_game.cpp @@ -40,24 +40,25 @@ MenuStateNewGame::MenuStateNewGame(Program *program, MainMenu *mainMenu): containerName = "NewGame"; Lang &lang= Lang::getInstance(); + int buttonWidth = 200; int yPos=465; buttonTutorial.registerGraphicComponent(containerName,"buttonTutorial"); - buttonTutorial.init(425, yPos, 150); + buttonTutorial.init(425, yPos, buttonWidth); yPos-=40; buttonScenario.registerGraphicComponent(containerName,"buttonScenario"); - buttonScenario.init(425, yPos, 150); + buttonScenario.init(425, yPos, buttonWidth); yPos-=40; buttonCustomGame.registerGraphicComponent(containerName,"buttonCustomGame"); - buttonCustomGame.init(425, yPos, 150); + buttonCustomGame.init(425, yPos, buttonWidth); yPos-=40; buttonMasterserverGame.registerGraphicComponent(containerName,"buttonMasterserverGame"); - buttonMasterserverGame.init(425, yPos, 150); + buttonMasterserverGame.init(425, yPos, buttonWidth); yPos-=40; buttonJoinGame.registerGraphicComponent(containerName,"buttonJoinGame"); - buttonJoinGame.init(425, yPos, 150); + buttonJoinGame.init(425, yPos, buttonWidth); yPos-=40; buttonReturn.registerGraphicComponent(containerName,"buttonReturn"); - buttonReturn.init(425, yPos, 150); + buttonReturn.init(425, yPos, buttonWidth); buttonCustomGame.setText(lang.get("CustomGame")); buttonScenario.setText(lang.get("Scenario")); diff --git a/source/glest_game/menu/menu_state_options.cpp b/source/glest_game/menu/menu_state_options.cpp index 715b03cb..dec19314 100644 --- a/source/glest_game/menu/menu_state_options.cpp +++ b/source/glest_game/menu/menu_state_options.cpp @@ -39,10 +39,10 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu): Shared::PlatformCommon::getFullscreenVideoModes(&modeInfos,!config.getBool("Windowed")); activeInputLabel=NULL; - int leftLabelStart=130; - int leftColumnStart=leftLabelStart+150; - int rightLabelStart=530; - int rightColumnStart=rightLabelStart+200; + int leftLabelStart=50; + int leftColumnStart=leftLabelStart+180; + int rightLabelStart=420; + int rightColumnStart=rightLabelStart+310; int buttonRowPos=80; int buttonStartPos=170; int captionOffset=75; @@ -522,7 +522,7 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu): buttonKeyboardSetup.setText(lang.get("Keyboardsetup")); buttonKeyboardSetup.registerGraphicComponent(containerName,"buttonKeyboardSetup"); - buttonKeyboardSetup.init(buttonStartPos+520, buttonRowPos, 125); + buttonKeyboardSetup.init(buttonStartPos+520, buttonRowPos, 145); GraphicComponent::applyAllCustomProperties(containerName); }