Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/replaymenu/replay_menu.js
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
var g_SelectedReplayDirectory = ""; | var g_SelectedReplayDirectory = ""; | ||||
/** | /** | ||||
* 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 the name of the currently opened view panel. | |||||
bb: period | |||||
Not Done Inline Actionsperiod bb: period | |||||
*/ | |||||
var g_SummarySelectedPanel = ""; | |||||
Not Done Inline Actions(maybe g_SelectedSummaryPanel and the jsdoc could state that it remembers the name of the panel, but the current part is ok too) elexis: (maybe g_SelectedSummaryPanel and the jsdoc could state that it remembers the name of the panel… | |||||
/** | |||||
* 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; | ||||
} | } | ||||
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.summarySelectedPanel) | |||||
g_SummarySelectedPanel = data.summarySelectedPanel; | |||||
} | } | ||||
/** | /** | ||||
* 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 277 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
period