Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/rdb/replay_actions.js
/** | |||||
* If we should skip the next selection change | |||||
*/ | |||||
var g_SelectionChange = 0; | |||||
function showReplay(selectionChange) { | |||||
if (selectionChange && g_SelectionChange > 0) { | |||||
g_SelectionChange -= 1; | |||||
return; | |||||
} | |||||
var replaySelection = Engine.GetGUIObjectByName("replaySelection"); | |||||
Engine.PushGuiPage("page_replayviewer.xml", { | |||||
"replay": g_Pages[g_PageNumber][replaySelection.selected], | |||||
}); | |||||
} | |||||
/** | |||||
* Flips by `offset` pages | |||||
*/ | |||||
function FlipPage(offset) { | |||||
g_PageNumber += offset; | |||||
Stan: Remove braces | |||||
Done Inline ActionsOh god, I keep forgetting this. Most projects say that you should never get rid of braces, and I'm just used to that now. gentz: Oh god, I keep forgetting this. Most projects say that you should never get rid of braces, and… | |||||
if (g_PageNumber < 0) | |||||
g_PageNumber = 0; | |||||
loadReplays([], g_PageNumber, 0); | |||||
g_ToLoadAfterQueryListResponce = true; | |||||
} | |||||
function refresh() { | |||||
Done Inline ActionsNo braces for single statements in ifs. Wrong indentation. Stan: No braces for single statements in ifs. Wrong indentation. | |||||
if (g_LoadingState < 1) | |||||
return; | |||||
g_PageNumber = 0; | |||||
g_Pages.length = 0; | |||||
loadReplays([], g_PageNumber, 0); | |||||
RdbQueryForReplayList(); | |||||
} |
Wildfire Games · Phabricator
Remove braces