Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/replaymenu/replay_menu.js
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Skip duplicate expensive GUI updates before init is complete. | * Skip duplicate expensive GUI updates before init is complete. | ||||
*/ | */ | ||||
var g_ReplaysLoaded = false; | var g_ReplaysLoaded = false; | ||||
/** | /** | ||||
* Remember last viewed summary panel and charts. | * Remember last viewed summary panel and charts. | ||||
*/ | */ | ||||
var g_SummarySelectedData; | var g_SummarySelection; | ||||
var g_MapCache = new MapCache(); | var g_MapCache = new MapCache(); | ||||
/** | /** | ||||
* Initializes globals, loads replays and displays the list. | * Initializes globals, loads replays and displays the list. | ||||
*/ | */ | ||||
function init(data) | function init(data) | ||||
{ | { | ||||
if (!g_Settings) | if (!g_Settings) | ||||
{ | { | ||||
Engine.SwitchGuiPage("page_pregame.xml"); | Engine.SwitchGuiPage("page_pregame.xml"); | ||||
return; | return; | ||||
} | } | ||||
g_SummarySelection = data && data.summarySelection; | |||||
loadReplays(data && data.replaySelectionData, false); | loadReplays(data && data.replaySelectionData, false); | ||||
if (!g_Replays) | if (!g_Replays) | ||||
{ | { | ||||
Engine.SwitchGuiPage("page_pregame.xml"); | Engine.SwitchGuiPage("page_pregame.xml"); | ||||
return; | return; | ||||
} | } | ||||
initHotkeyTooltips(); | initHotkeyTooltips(); | ||||
displayReplayList(); | displayReplayList(); | ||||
if (data && data.summarySelectedData) | |||||
g_SummarySelectedData = data.summarySelectedData; | |||||
} | } | ||||
/** | /** | ||||
* 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. | ||||
* @param replaySelectionData - Currently selected filters and item to be restored after the loading. | * @param replaySelectionData - Currently selected filters and item to be restored after the loading. | ||||
* @param compareFiles - If true, compares files briefly (which might be slow with optical harddrives), | * @param compareFiles - If true, compares files briefly (which might be slow with optical harddrives), | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator