mirror of
https://github.com/glest/glest-source.git
synced 2025-08-15 04:43:58 +02:00
- do not allow changing of resource multiplier for human players
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user