Index: binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/HotkeyButton.js =================================================================== --- /dev/null +++ binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/HotkeyButton.js @@ -0,0 +1,17 @@ +/** + * This class manages the button that allows the player to display the hotkey page. + */ +class HotkeyButton +{ + constructor() + { + this.hotkeyButton = Engine.GetGUIObjectByName("hotkeyButton") + this.hotkeyButton.onPress = this.onPress.bind(this); + this.hotkeyButton.caption = translate("Hotkeys"); + } + + onPress() + { + Engine.PushGuiPage("hotkeys/page_hotkeys.xml"); + } +} Index: binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/LastSummaryButton.js =================================================================== --- /dev/null +++ binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/LastSummaryButton.js @@ -0,0 +1,17 @@ +/** + * This class manages the button that allows the player to display the replay page. + */ +class LastSummaryButton +{ + constructor() + { + this.replayButton = Engine.GetGUIObjectByName("lastSummaryButton") + this.replayButton.onPress = this.onPress.bind(this); + this.replayButton.caption = translate("Last Summary"); + } + + onPress() + { + Engine.PushGuiPage("page_options.xml") + } +} Index: binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/MapBrowserButton.js =================================================================== --- /dev/null +++ binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/MapBrowserButton.js @@ -0,0 +1,17 @@ +/** + * This class manages the button that allows the player to display the map browser page. + */ +class MapBrowserButton +{ + constructor() + { + this.mapBrowserButton = Engine.GetGUIObjectByName("mapBrowserButton") + this.mapBrowserButton.onPress = this.onPress.bind(this); + this.mapBrowserButton.caption = translate("Maps"); + } + + onPress() + { + Engine.PushGuiPage("page_mapbrowser.xml"); + } +} Index: binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/OptionsButton.js =================================================================== --- /dev/null +++ binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/OptionsButton.js @@ -0,0 +1,17 @@ +/** + * This class manages the button that allows the player to display the options page. + */ +class OptionsButton +{ + constructor() + { + this.optionsButton = Engine.GetGUIObjectByName("optionsButton") + this.optionsButton.onPress = this.onPress.bind(this); + this.optionsButton.caption = translate("Options"); + } + + onPress() + { + Engine.PushGuiPage("page_options.xml"); + } +} Index: binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/ReplayButton.js =================================================================== --- /dev/null +++ binaries/data/mods/public/gui/lobby/LobbyPage/Buttons/ReplayButton.js @@ -0,0 +1,17 @@ +/** + * This class manages the button that allows the player to display the replay page. + */ +class ReplayButton +{ + constructor() + { + this.replayButton = Engine.GetGUIObjectByName("replayButton") + this.replayButton.onPress = this.onPress.bind(this); + this.replayButton.caption = translate("Replay"); + } + + onPress() + { + Engine.PushGuiPage("page_replaymenu.xml") + } +} Index: binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.js =================================================================== --- binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.js +++ binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.js @@ -16,10 +16,15 @@ "buttons": { "buddyButton": buddyButton, "hostButton": new HostButton(dialog, xmppMessages), + "hotkeyButton": new HotkeyButton(), "joinButton": new JoinButton(dialog, gameList), + "lastSummaryButton": new LastSummaryButton(), "leaderboardButton": new LeaderboardButton(xmppMessages, leaderboardPage), + "mapBrowserButton": new MapBrowserButton(), + "optionsButton": new OptionsButton(), "profileButton": new ProfileButton(xmppMessages, profilePage), - "quitButton": new QuitButton(dialog, leaderboardPage, profilePage) + "quitButton": new QuitButton(dialog, leaderboardPage, profilePage), + "replayButton": new ReplayButton() }, "panels": { "chatPanel": new ChatPanel(xmppMessages), @@ -31,7 +36,7 @@ }, "eventHandlers": { "announcementHandler": new AnnouncementHandler(xmppMessages), - "connectionHandler": new ConnectionHandler(xmppMessages), + "connectionHandler": new ConnectionHandler(xmppMessages) } }; Index: binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.xml =================================================================== --- binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.xml +++ binaries/data/mods/public/gui/lobby/LobbyPage/LobbyPage.xml @@ -16,20 +16,20 @@ - + - + - - - + + + - + @@ -39,6 +39,11 @@ + + + + + @@ -48,9 +53,9 @@ - - - + + + Index: binaries/data/mods/public/gui/replaymenu/replay_actions.js =================================================================== --- binaries/data/mods/public/gui/replaymenu/replay_actions.js +++ binaries/data/mods/public/gui/replaymenu/replay_actions.js @@ -158,6 +158,16 @@ else deleteReplay(); } + +function closeReplay() +{ + if (Engine.HasXmppClient()) + { + Engine.StopXmppClient() + Engine.SwitchGuiPage("page_pregame.xml") + } + return Engine.SwitchGuiPage("page_pregame.xml"); +} /** * Shows a confirmation dialog and deletes the selected replay from the disk in case. */ Index: binaries/data/mods/public/gui/replaymenu/replay_menu.xml =================================================================== --- binaries/data/mods/public/gui/replaymenu/replay_menu.xml +++ binaries/data/mods/public/gui/replaymenu/replay_menu.xml @@ -225,7 +225,7 @@ Main Menu - Engine.SwitchGuiPage("page_pregame.xml"); + closeReplay();