From 8d16e6247fb43b24a32c8b45e48cb3074299a38c Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 5 Oct 2012 23:03:05 +0000 Subject: [PATCH] - do not allow changing of resource multiplier for human players --- source/glest_game/menu/menu_state_connected_game.cpp | 8 ++++---- source/glest_game/menu/menu_state_custom_game.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 8157748ea..f8d9377b1 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -1100,8 +1100,8 @@ void MenuStateConnectedGame::updateResourceMultiplier(const int index) { ControlType ct= static_cast(listBoxControls[index].getSelectedItemIndex()); if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) { listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); - //listBoxRMultiplier[index].setEnabled(false); - listBoxRMultiplier[index].setEnabled(true); + listBoxRMultiplier[index].setEnabled(false); + //!!!listBoxRMultiplier[index].setEnabled(true); } else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy) { @@ -3776,8 +3776,8 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings, } ControlType ct= gameSettings->getFactionControl(i); - //if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) { - if (ct == ctClosed) { + if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) { + //!!!if (ct == ctClosed) { listBoxRMultiplier[slot].setEnabled(false); listBoxRMultiplier[slot].setVisible(false); } diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 7dc4dbc34..a48cff729 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1485,8 +1485,8 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) { ControlType ct= static_cast(listBoxControls[index].getSelectedItemIndex()); if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) { listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); - //listBoxRMultiplier[index].setEnabled(false); - listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false); + listBoxRMultiplier[index].setEnabled(false); + //!!!listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false); } else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy) { @@ -1508,8 +1508,8 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) { listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false); } listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled()); - //listBoxRMultiplier[index].setVisible(ct != ctHuman && ct != ctNetwork && ct != ctClosed); - listBoxRMultiplier[index].setVisible(ct != ctClosed); + listBoxRMultiplier[index].setVisible(ct != ctHuman && ct != ctNetwork && ct != ctClosed); + //listBoxRMultiplier[index].setVisible(ct != ctClosed); } void MenuStateCustomGame::loadGameSettings(std::string fileName) {