- do not allow changing of resource multiplier for human players

This commit is contained in:
Mark Vejvoda
2012-10-05 23:03:05 +00:00
parent a8b8dcf464
commit 8d16e6247f
2 changed files with 8 additions and 8 deletions

View File

@@ -1100,8 +1100,8 @@ void MenuStateConnectedGame::updateResourceMultiplier(const int index) {
ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex()); ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex());
if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) { if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10);
//listBoxRMultiplier[index].setEnabled(false); listBoxRMultiplier[index].setEnabled(false);
listBoxRMultiplier[index].setEnabled(true); //!!!listBoxRMultiplier[index].setEnabled(true);
} }
else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy) else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy)
{ {
@@ -3776,8 +3776,8 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
} }
ControlType ct= gameSettings->getFactionControl(i); ControlType ct= gameSettings->getFactionControl(i);
//if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) { if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
if (ct == ctClosed) { //!!!if (ct == ctClosed) {
listBoxRMultiplier[slot].setEnabled(false); listBoxRMultiplier[slot].setEnabled(false);
listBoxRMultiplier[slot].setVisible(false); listBoxRMultiplier[slot].setVisible(false);
} }

View File

@@ -1485,8 +1485,8 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) {
ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex()); ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex());
if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) { if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10);
//listBoxRMultiplier[index].setEnabled(false); listBoxRMultiplier[index].setEnabled(false);
listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false); //!!!listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false);
} }
else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy) else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy)
{ {
@@ -1508,8 +1508,8 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) {
listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false); listBoxRMultiplier[index].setEnabled(checkBoxScenario.getValue() == false);
} }
listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled()); listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled());
//listBoxRMultiplier[index].setVisible(ct != ctHuman && ct != ctNetwork && ct != ctClosed); listBoxRMultiplier[index].setVisible(ct != ctHuman && ct != ctNetwork && ct != ctClosed);
listBoxRMultiplier[index].setVisible(ct != ctClosed); //listBoxRMultiplier[index].setVisible(ct != ctClosed);
} }
void MenuStateCustomGame::loadGameSettings(std::string fileName) { void MenuStateCustomGame::loadGameSettings(std::string fileName) {