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 @@ -23,6 +23,13 @@ */ const g_LobbyServer = Engine.ConfigDB_GetValue("user", "lobby.server"); +const g_MoreButtons = [ + { "text": "Replays", "func": () => Engine.PushGuiPage("page_replaymenu.xml", { "pushedGui": "Lobby" }) }, + { "text": "Last Summary", "func": () => lastSummary() }, + { "text": "Civilizations", "func": () => Engine.PushGuiPage("page_structree.xml", {}) }, + { "text": "Options", "func": () => Engine.PushGuiPage("page_options.xml", { "selectedCategory": 3 }) } +]; + /** * Current games will be listed in these colors. */ @@ -401,8 +408,30 @@ // Get all messages since the login for (let msg of Engine.LobbyGuiPollHistoricMessages()) g_NetMessageTypes[msg.type][msg.level](msg); + showMoreButtons(false); + Engine.GetGUIObjectByName("moreOptionsBarActionHide").onmouseenter = () => showMoreButtons(false); + Engine.GetGUIObjectByName("moreOptionsBarActionShow").onmouseenter = () => showMoreButtons(true); + + let size = (1/g_MoreButtons.length)*100; + + for (let i in g_MoreButtons) + { + let but = Engine.GetGUIObjectByName("moreButtons[" + i + "]"); + but.hidden = false; + but.size = i*size + "%" + (i>0 ? "+3" : "") + " 100%-25 " + ((+i+1)*size) + "%" + (i - - + + submitChatInput(); autoCompleteNick(this, Engine.GetPlayerList().map(player => player.name)); + +