Changeset View
Standalone View
binaries/data/mods/public/gui/gamesetup/gamesetup.js
Context not available. | |||||
} | } | ||||
deepfreeze(g_DefaultPlayerData); | deepfreeze(g_DefaultPlayerData); | ||||
Engine.GetGUIObjectByName("mapBrowser").tooltip = sprintf( | |||||
translate("%(hotkey_openMapBrowser)s : Open map browser."), | |||||
ffffffff: typo browser | |||||
Done Inline ActionsYep nani: Yep | |||||
{ "hotkey_openMapBrowser": colorizeHotkey("%(hotkey)s", "gamesetup.openMapBrowser") }); | |||||
} | } | ||||
/** | /** | ||||
Done Inline ActionsThe opened dialog is not updated if the server broadcasted new g_GameAttributes. 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.) 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… | |||||
Done Inline ActionsRemove from this diff, possibly insert reference to the according revision proposal. elexis: Remove from this diff, possibly insert reference to the according revision proposal. | |||||
Context not available. | |||||
updateGUIObjects(); | updateGUIObjects(); | ||||
} | } | ||||
function openMapBrowser() | |||||
Done Inline Actions(refs D1684) elexis: (refs D1684) | |||||
{ | |||||
Engine.PushGuiPage("page_mapbrowser.xml", | |||||
{ | |||||
"callback": "mapBrowserCallback", | |||||
"map": { | |||||
"type": g_GameAttributes.mapType, | |||||
"filter": g_GameAttributes.mapFilter, | |||||
"name": g_GameAttributes.map // includes the map path | |||||
} | |||||
}); | |||||
} | |||||
/** | |||||
* Called after closing the dialog. | |||||
*/ | |||||
function mapBrowserCallback(data) | |||||
{ | |||||
if (!g_IsController || !data || !data.map ) | |||||
return; | |||||
Done Inline Actions
elexis: * Changing the maptype will drop all host settings. Only do such things if they actually… | |||||
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)); | |||||
updateGameAttributes(); | |||||
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) | |||||
} | |||||
function openAIConfig(playerSlot) | function openAIConfig(playerSlot) | ||||
{ | { | ||||
g_LastViewedAIPlayer = playerSlot; | g_LastViewedAIPlayer = playerSlot; | ||||
Context not available. |
typo browser