Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/replaymenu/replay_menu.js
Context not available. | |||||
return; | return; | ||||
} | } | ||||
loadReplays(data && data.replaySelectionData, false); | loadReplays(data && data.replaySelectionData || null, false); | ||||
if (!g_Replays) | if (!g_Replays) | ||||
{ | { | ||||
Context not available. | |||||
return; | return; | ||||
} | } | ||||
initGUIWindow(); | |||||
initHotkeyTooltips(); | initHotkeyTooltips(); | ||||
displayReplayList(); | displayReplayList(); | ||||
Context not available. | |||||
} | } | ||||
/** | /** | ||||
* Set sprite of the window and size of the window and the window title and close button caption. | |||||
*/ | |||||
function initGUIWindow() | |||||
{ | |||||
let dialog = Engine.HasXmppClient(); | |||||
let window = Engine.GetGUIObjectByName("replayWindow"); | |||||
window.sprite = dialog ? "ModernDialog" : "ModernWindow"; | |||||
window.size = dialog ? "16 24 100%-16 100%-24" : "0 0 100% 100%"; | |||||
Engine.GetGUIObjectByName("replayWindowTitle").size = dialog ? "50%-128 -16 50%+128 16" : "50%-128 4 50%+128 36"; | |||||
Engine.GetGUIObjectByName("closeButton").caption = dialog ? translate("Lobby") : translate("Main Menu"); | |||||
Engine.GetGUIObjectByName("fadeImage").hidden = !dialog; | |||||
} | |||||
/** | |||||
* Store the list of replays loaded in C++ in g_Replays. | * Store the list of replays loaded in C++ in g_Replays. | ||||
* Check timestamp and compatibility and extract g_Playernames, g_MapNames, g_VictoryConditions. | * Check timestamp and compatibility and extract g_Playernames, g_MapNames, g_VictoryConditions. | ||||
* Restore selected filters and item. | * Restore selected filters and item. | ||||
Context not available. |
Wildfire Games · Phabricator