From 06c3186466a68eab79811233d60398c7f03d9b26 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 19 Jun 2013 01:03:51 +0000 Subject: [PATCH] client can now see if techtree translated setting shows --- .../menu/menu_state_connected_game.cpp | 19 +++++++++++++++++++ .../menu/menu_state_connected_game.h | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index aed17473..faf81513 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -286,6 +286,16 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM labelTechTree.init(xoffset+620, mapHeadPos); labelTechTree.setText(lang.get("TechTree")); + labelAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"labelAllowNativeLanguageTechtree"); + labelAllowNativeLanguageTechtree.init(xoffset+620, mapHeadPos-45); + labelAllowNativeLanguageTechtree.setText(lang.get("AllowNativeLanguageTechtree")); + + checkBoxAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"checkBoxAllowNativeLanguageTechtree"); + checkBoxAllowNativeLanguageTechtree.init(xoffset+620, mapHeadPos-65); + checkBoxAllowNativeLanguageTechtree.setValue(false); + checkBoxAllowNativeLanguageTechtree.setEditable(false); + checkBoxAllowNativeLanguageTechtree.setEnabled(false); + if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); xoffset=100; @@ -677,6 +687,8 @@ void MenuStateConnectedGame::reloadUI() { labelScenario.setText(lang.get("Scenario")); + labelAllowNativeLanguageTechtree.setText(lang.get("AllowNativeLanguageTechtree")); + buttonPlayNow.setText(lang.get("PlayNow")); buttonRestoreLastSettings.setText(lang.get("ReloadLastGameSettings")); @@ -2281,6 +2293,8 @@ void MenuStateConnectedGame::mouseMove(int x, int y, const MouseState *ms) { checkBoxScenario.mouseMove(x, y); listBoxScenario.mouseMove(x, y); + checkBoxAllowNativeLanguageTechtree.mouseMove(x, y); + buttonPlayNow.mouseMove(x, y); buttonRestoreLastSettings.mouseMove(x, y); } @@ -2524,6 +2538,9 @@ void MenuStateConnectedGame::render() { renderer.renderListBox(&listBoxScenario); } + renderer.renderLabel(&labelAllowNativeLanguageTechtree); + renderer.renderCheckBox(&checkBoxAllowNativeLanguageTechtree); + MutexSafeWrapper safeMutexFTPProgress((ftpClientThread != NULL ? ftpClientThread->getProgressMutex() : NULL),string(__FILE__) + "_" + intToStr(__LINE__)); // !!! START TEMP MV @@ -4590,6 +4607,8 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings, } } } + + checkBoxAllowNativeLanguageTechtree.setValue(gameSettings->getNetworkAllowNativeLanguageTechtree()); } void MenuStateConnectedGame::initFactionPreview(const GameSettings *gameSettings) { diff --git a/source/glest_game/menu/menu_state_connected_game.h b/source/glest_game/menu/menu_state_connected_game.h index a27223cb..51413bc3 100644 --- a/source/glest_game/menu/menu_state_connected_game.h +++ b/source/glest_game/menu/menu_state_connected_game.h @@ -92,9 +92,11 @@ private: int nonAdminPlayerStatusX; GraphicLabel labelAllowObservers; - //GraphicListBox listBoxAllowObservers; GraphicCheckBox checkBoxAllowObservers; + GraphicLabel labelAllowNativeLanguageTechtree; + GraphicCheckBox checkBoxAllowNativeLanguageTechtree; + GraphicLabel *activeInputLabel; time_t timerLabelFlash;