Index: binaries/data/config/default.cfg =================================================================== --- binaries/data/config/default.cfg +++ binaries/data/config/default.cfg @@ -147,8 +147,9 @@ togglefullscreen = "Alt+Return" ; Toggle fullscreen/windowed mode screenshot.watermark = "Alt+K" ; Toggle product/company watermark for official screenshots wireframe = "Alt+W" ; Toggle wireframe mode -silhouettes = "Alt+S" ; Toggle unit silhouettes +silhouettes = "Ctrl+Alt+S" ; Toggle unit silhouettes showsky = "Alt+Z" ; Toggle sky +summary = "Alt+S" ; Toggle summary ; > CLIPBOARD CONTROLS copy = "Ctrl+C" ; Copy to clipboard Index: binaries/data/mods/public/gui/lobby/lobby.js =================================================================== --- binaries/data/mods/public/gui/lobby/lobby.js +++ binaries/data/mods/public/gui/lobby/lobby.js @@ -367,6 +367,26 @@ } }; +let g_Replays = Engine.GetReplays(false).filter(replay => + replay.attribs.settings.PlayerData.filter(player => player && !player.AI).length > 1 ).sort((a, b) => + { + let cmpA, cmpB; + switch ("months") + { + case 'months': + cmpA = +a.attribs.timestamp; + cmpB = +b.attribs.timestamp; + break; + } + + if (cmpA < cmpB) + return +1; + else if (cmpA > cmpB) + return -1; + + return 0; + }); + /** * Called after the XmppConnection succeeded and when returning from a game. * @@ -1462,3 +1482,24 @@ "percentage": (attr.wins / attr.totalGamesPlayed * 100).toFixed(2) }); } + +function showLastSummary() +{ + if (!g_Replays) + return; + + let simData = Engine.GetReplayMetadata(g_Replays[0].directory); + + if (!simData) + { + messageBox(500, 200, translate("No summary data available."), translate("Error")); + return; + } + + Engine.PushGuiPage("page_summary.xml", { + "sim": simData, + "gui": { + "replayDirectory": g_Replays[0].directory + } + }); +} Index: binaries/data/mods/public/gui/lobby/lobby.xml =================================================================== --- binaries/data/mods/public/gui/lobby/lobby.xml +++ binaries/data/mods/public/gui/lobby/lobby.xml @@ -22,6 +22,10 @@ onTick(); + + showLastSummary() + + confirmStartReplay(); - + Continue continueButton();