From 944f6f0eee23851b2e3b047d0dcfae99217e99dd Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Mon, 3 Jan 2011 02:35:09 +0000 Subject: [PATCH] resource multiplier is not shown on client side for humans ... --- source/glest_game/menu/menu_state_connected_game.cpp | 9 +++++++++ source/glest_game/menu/menu_state_custom_game.cpp | 3 ++- 2 files changed, 11 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 145d215d..852b543a 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -1147,6 +1147,15 @@ void MenuStateConnectedGame::update() { } } + ControlType ct= gameSettings->getFactionControl(i); + if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) { + listBoxRMultiplier[slot].setEnabled(false); + listBoxRMultiplier[slot].setVisible(false); + } else { + listBoxRMultiplier[slot].setEnabled(true); + listBoxRMultiplier[slot].setVisible(true); + } + if(gameSettings->getFactionControl(i) == ctNetwork && gameSettings->getThisFactionIndex() == i){ // set my current slot to ctHuman diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index c8410200..7c9032da 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -940,6 +940,7 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) { listBoxRMultiplier[index].setEnabled(true); } listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled()); + listBoxRMultiplier[index].setVisible(listBoxRMultiplier[index].getEnabled()); } @@ -1261,7 +1262,7 @@ void MenuStateCustomGame::render() { renderer.renderListBox(&listBoxControls[i]); if(listBoxControls[i].getSelectedItemIndex()!=ctClosed){ - if(listBoxRMultiplier[i].getEnabled() && (listBoxAdvanced.getSelectedItemIndex() == 1)){ + if(listBoxAdvanced.getSelectedItemIndex() == 1){ renderer.renderListBox(&listBoxRMultiplier[i]); } renderer.renderListBox(&listBoxFactions[i]);