Ticket #2779: 2779.diff
File 2779.diff, 1.8 KB (added by , 10 years ago) |
---|
-
binaries/data/mods/public/gui/gamesetup/gamesetup.js
382 382 var civ = Engine.GetGUIObjectByName("playerCiv["+i+"]"); 383 383 civ.onSelectionChange = function() 384 384 { // Update civ 385 if ((this.selected != -1)&&(g_GameAttributes.mapType !== "scenario") )385 if ((this.selected != -1)&&(g_GameAttributes.mapType !== "scenario")&&(this.list_data[this.selected] !== undefined)) 386 386 g_GameAttributes.settings.PlayerData[playerSlot].Civ = this.list_data[this.selected]; 387 387 388 388 if (!g_IsInGuiUpdate) … … 1029 1029 var mapSelectionBox = Engine.GetGUIObjectByName("mapSelection"); 1030 1030 mapSelectionBox.selected = mapSelectionBox.list_data.indexOf(mapName); 1031 1031 Engine.GetGUIObjectByName("mapSelectionText").caption = translate(getMapDisplayName(mapName)); 1032 var populationCapBox = Engine.GetGUIObjectByName("populationCap"); 1033 populationCapBox.selected = populationCapBox.list_data.indexOf(mapSettings.PopulationCap); 1034 var startingResourcesBox = Engine.GetGUIObjectByName("startingResources"); 1035 startingResourcesBox.selected = startingResourcesBox.list_data.indexOf(mapSettings.StartingResources); 1032 1033 if (mapSettings.PopulationCap !== undefined) 1034 { 1035 var populationCapBox = Engine.GetGUIObjectByName("populationCap"); 1036 populationCapBox.selected = populationCapBox.list_data.indexOf(mapSettings.PopulationCap); 1037 } 1038 1039 if (mapSettings.StartingResources !== undefined) 1040 { 1041 var startingResourcesBox = Engine.GetGUIObjectByName("startingResources"); 1042 startingResourcesBox.selected = startingResourcesBox.list_data.indexOf(mapSettings.StartingResources); 1043 } 1044 1036 1045 initMapNameList(); 1037 1046 } 1038 1047