menu_state_custom_game_update.cpp:fixes #89

This commit is contained in:
andy5995 2018-03-08 00:02:43 -06:00
parent c29485803d
commit a31c86e987
No known key found for this signature in database
GPG Key ID: 06BFEC9B82603CAF

View File

@ -595,8 +595,6 @@ namespace Glest
&& chrono.getMillis () > 0)
chrono.start ();
//ServerInterface* serverInterface= NetworkManager::getInstance().getServerInterface();
if (checkBoxScenario.getValue () == false)
{
// When scenario is checked the value for mapInfo.players is reset to
@ -645,8 +643,8 @@ namespace Glest
listBoxFactions[i].setEditable (true);
listBoxTeams[i].setEditable (true);
if (listBoxFactions[i].getSelectedItem () ==
formatString (GameConstants::OBSERVER_SLOTNAME))
if (listBoxControls[i].getSelectedItemIndex () == ctNetwork &&
listBoxFactions[i].getSelectedItem () == formatString (GameConstants::OBSERVER_SLOTNAME))
{
listBoxFactions[i].setSelectedItemIndex (0);
}
@ -655,16 +653,12 @@ namespace Glest
{
listBoxControls[i].setEditable (false);
listBoxControls[i].setEnabled (false);
//printf("In [%s::%s] Line: %d i = %d mapInfo.players = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,mapInfo.players);
}
}
else
{
listBoxControls[i].setEditable (false);
listBoxControls[i].setEnabled (false);
//printf("In [%s::%s] Line: %d i = %d mapInfo.players = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,mapInfo.players);
}
}
}