Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/gamesetup.js
Context not available. | |||||
updateGUIObjects(); | updateGUIObjects(); | ||||
} | } | ||||
function MapBrowserOpen() | |||||
{ | |||||
Engine.PushGuiPage("page_mapbrowser.xml", | |||||
{ | |||||
elexis: The opened dialog is not updated if the server broadcasted new g_GameAttributes.
This is… | |||||
Done Inline ActionsThe map browser is not meant to show the currently selected map from game setup but rather use the current selected map as starting point for opening the map browser. The functionality can added if it is really necessary in the future. nani: The map browser is not meant to show the currently selected map from game setup but rather use… | |||||
Done Inline ActionsDisplaying the currently selected map (blue selection marker as with text) allows the viewer to see if the currently selected map the best choice for the upcoming map. I guess that makes sense to add after and only after #5369 was committed (otherwise one would have to close the page and reopen it with the new data) elexis: Displaying the currently selected map (blue selection marker as with text) allows the viewer to… | |||||
"callback": "MapBrowserCallback", | |||||
"mapSelected": true, | |||||
"map": { | |||||
"type": g_GameAttributes.mapType, | |||||
Done Inline Actions(refs D1684) elexis: (refs D1684) | |||||
"filter": g_GameAttributes.mapFilter, | |||||
"name": g_GameAttributes.map // includes the map path | |||||
} | |||||
}); | |||||
} | |||||
/** | |||||
* Called after closing the dialog. | |||||
*/ | |||||
function MapBrowserCallback(data) | |||||
{ | |||||
if (!g_IsController || !data.mapSelected) | |||||
return; | |||||
if (g_Dropdowns.mapType.get() != data.map.type) | |||||
g_Dropdowns.mapType.select(g_Dropdowns.mapType.ids().indexOf(data.map.type)); | |||||
g_Dropdowns.mapFilter.select(g_Dropdowns.mapFilter.ids().indexOf(data.map.filter)); | |||||
g_Dropdowns.mapSelection.select(g_Dropdowns.mapSelection.ids().indexOf(data.map.path + data.map.name)); | |||||
Done Inline Actions
elexis: * Changing the maptype will drop all host settings. Only do such things if they actually… | |||||
updateGameAttributes(); | |||||
} | |||||
function openAIConfig(playerSlot) | function openAIConfig(playerSlot) | ||||
{ | { | ||||
g_LastViewedAIPlayer = playerSlot; | g_LastViewedAIPlayer = playerSlot; | ||||
Context not available. | |||||
Done Inline Actions
elexis: * `updateGameAttributes` not `updateGUIObjects` necessary to broadcast `g_GameAttributes` for… | |||||
Done Inline Actions.select doesn't call updateGameAttributes nani: `.select` doesn't call `updateGameAttributes`
| |||||
Done Inline Actionsindeed (the function that primarily calls .select called that) elexis: indeed (the function that primarily calls .select called that) |
Wildfire Games · Phabricator
The opened dialog is not updated if the server broadcasted new g_GameAttributes.
This is relevant in case the mapbrowser shows data about the currently selected map, or if there are multiple clients that can change g_GameAttributes (or if there was another event that would change one of the three g_GameAttributes properties).
This is currently solved by the AI config dialog by closing the child page and reopning it. (If the patch to #5369 was committed that would be trivial to solve.)