diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index 644154e195..761050aa1f 100644 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -75,7 +75,6 @@ namespace OpenRA.GameRules public bool SanityCheckUnsyncedCode = false; public int Samples = 25; public bool IgnoreVersionMismatch = false; - public bool DeveloperMenu = false; public bool ShowFatalErrorDialog = true; public string FatalErrorDialogFaq = "http://github.com/OpenRA/OpenRA/wiki/FAQ"; diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index 1a32ce6b2f..c62b2d062c 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -74,7 +74,6 @@ - @@ -90,7 +89,7 @@ - + diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index 532dddba9f..d32ea18393 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -39,8 +39,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic public CncIngameChromeLogic(Widget widget, World world) { this.world = world; - world.WorldActor.Trait() - .Fade(CncMenuPaletteEffect.EffectType.None); + world.WorldActor.Trait() + .Fade(MenuPaletteEffect.EffectType.None); ingameRoot = widget.Get("INGAME_ROOT"); var playerRoot = ingameRoot.Get("PLAYER_ROOT"); diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs index 23caa5283b..b575ca84a1 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs @@ -11,6 +11,7 @@ using System; using System.Linq; using OpenRA.Graphics; +using OpenRA.Mods.RA; using OpenRA.Traits; using OpenRA.Widgets; @@ -27,8 +28,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic { var resumeDisabled = false; menu = widget.Get("INGAME_MENU"); - var mpe = world.WorldActor.Trait(); - mpe.Fade(CncMenuPaletteEffect.EffectType.Desaturated); + var mpe = world.WorldActor.Trait(); + mpe.Fade(MenuPaletteEffect.EffectType.Desaturated); menu.Get("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version; @@ -40,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic { Sound.PlayNotification(null, "Speech", "Leave", null); resumeDisabled = true; - Game.RunAfterDelay(1200, () => mpe.Fade(CncMenuPaletteEffect.EffectType.Black)); + Game.RunAfterDelay(1200, () => mpe.Fade(MenuPaletteEffect.EffectType.Black)); Game.RunAfterDelay(1200 + 40 * mpe.Info.FadeLength, () => { Game.Disconnect(); @@ -86,7 +87,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic { Ui.CloseWindow(); Ui.Root.RemoveChild(menu); - world.WorldActor.Trait().Fade(CncMenuPaletteEffect.EffectType.None); + world.WorldActor.Trait().Fade(MenuPaletteEffect.EffectType.None); onExit(); }; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncMainMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncMainMenuLogic.cs new file mode 100644 index 0000000000..a3876179fa --- /dev/null +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncMainMenuLogic.cs @@ -0,0 +1,30 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using OpenRA.Mods.RA.Widgets.Logic; +using OpenRA.Widgets; + +namespace OpenRA.Mods.Cnc.Widgets.Logic +{ + public class CncMainMenuLogic : MainMenuLogic + { + [ObjectCreator.UseCtor] + public CncMainMenuLogic(Widget widget, World world) + : base(widget, world) + { + var shellmapDecorations = widget.Get("SHELLMAP_DECORATIONS"); + shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap; + shellmapDecorations.Get("RECBLOCK").IsVisible = () => world.FrameNumber / 25 % 2 == 0; + + var shellmapDisabledDecorations = widget.Get("SHELLMAP_DISABLED_DECORATIONS"); + shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap; + } + } +} diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs deleted file mode 100644 index a8e5bf046c..0000000000 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncMenuLogic.cs +++ /dev/null @@ -1,152 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Net; -using OpenRA.Mods.RA.Widgets.Logic; -using OpenRA.Widgets; - -namespace OpenRA.Mods.Cnc.Widgets.Logic -{ - public class CncMenuLogic - { - enum MenuType { Main, Multiplayer, Settings, None } - - MenuType menuType = MenuType.Main; - Widget rootMenu; - - [ObjectCreator.UseCtor] - public CncMenuLogic(Widget widget, World world) - { - world.WorldActor.Trait() - .Fade(CncMenuPaletteEffect.EffectType.Desaturated); - - rootMenu = widget.Get("MENU_BACKGROUND"); - rootMenu.Get("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version; - - // Menu buttons - var mainMenu = widget.Get("MAIN_MENU"); - mainMenu.IsVisible = () => menuType == MenuType.Main; - - mainMenu.Get("SOLO_BUTTON").OnClick = StartSkirmishGame; - mainMenu.Get("MULTIPLAYER_BUTTON").OnClick = () => menuType = MenuType.Multiplayer; - - mainMenu.Get("MODS_BUTTON").OnClick = () => - { - menuType = MenuType.None; - Ui.OpenWindow("MODS_PANEL", new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Main }, - { "onSwitch", RemoveShellmapUI } - }); - }; - - mainMenu.Get("SETTINGS_BUTTON").OnClick = () => menuType = MenuType.Settings; - mainMenu.Get("QUIT_BUTTON").OnClick = Game.Exit; - - // Multiplayer menu - var multiplayerMenu = widget.Get("MULTIPLAYER_MENU"); - multiplayerMenu.IsVisible = () => menuType == MenuType.Multiplayer; - - multiplayerMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; - multiplayerMenu.Get("JOIN_BUTTON").OnClick = () => OpenGamePanel("SERVERBROWSER_PANEL"); - multiplayerMenu.Get("CREATE_BUTTON").OnClick = () => OpenGamePanel("CREATESERVER_PANEL"); - multiplayerMenu.Get("DIRECTCONNECT_BUTTON").OnClick = () => OpenGamePanel("DIRECTCONNECT_PANEL"); - - // Settings menu - var settingsMenu = widget.Get("SETTINGS_MENU"); - settingsMenu.IsVisible = () => menuType == MenuType.Settings; - - settingsMenu.Get("REPLAYS_BUTTON").OnClick = () => - { - menuType = MenuType.None; - Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Settings }, - { "onStart", RemoveShellmapUI } - }); - }; - - settingsMenu.Get("MUSIC_BUTTON").OnClick = () => - { - menuType = MenuType.None; - Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Settings }, - }); - }; - - settingsMenu.Get("CREDITS_BUTTON").OnClick = () => - { - menuType = MenuType.None; - Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Settings }, - }); - }; - - settingsMenu.Get("SETTINGS_BUTTON").OnClick = () => - { - menuType = MenuType.None; - Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Settings }, - }); - }; - - settingsMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; - - var shellmapDecorations = widget.Get("SHELLMAP_DECORATIONS"); - shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap; - shellmapDecorations.Get("RECBLOCK").IsVisible = () => world.FrameNumber / 25 % 2 == 0; - - var shellmapDisabledDecorations = widget.Get("SHELLMAP_DISABLED_DECORATIONS"); - shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap; - } - - void OpenGamePanel(string id) - { - menuType = MenuType.None; - Ui.OpenWindow(id, new WidgetArgs() - { - { "onExit", () => menuType = MenuType.Multiplayer }, - { "openLobby", () => OpenLobbyPanel(MenuType.Multiplayer, false) } - }); - } - - void RemoveShellmapUI() - { - rootMenu.Parent.RemoveChild(rootMenu); - } - - void OpenLobbyPanel(MenuType menu, bool addBots) - { - menuType = MenuType.None; - Game.OpenWindow("SERVER_LOBBY", new WidgetArgs() - { - { "onExit", () => { Game.Disconnect(); menuType = menu; } }, - { "onStart", RemoveShellmapUI }, - { "addBots", addBots } - }); - } - - void StartSkirmishGame() - { - var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map); - Game.Settings.Server.Map = map; - Game.Settings.Save(); - - ConnectionLogic.Connect(IPAddress.Loopback.ToString(), - Game.CreateLocalServer(map), - "", - () => OpenLobbyPanel(MenuType.Main, true), - () => { Game.CloseServer(); menuType = MenuType.Main; }); - } - } -} diff --git a/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs b/OpenRA.Mods.RA/MenuPaletteEffect.cs similarity index 80% rename from OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs rename to OpenRA.Mods.RA/MenuPaletteEffect.cs index e3cbe78313..b9e6426077 100644 --- a/OpenRA.Mods.Cnc/CncMenuPaletteEffect.cs +++ b/OpenRA.Mods.RA/MenuPaletteEffect.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -14,25 +14,25 @@ using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.Cnc +namespace OpenRA.Mods.RA { - public class CncMenuPaletteEffectInfo : ITraitInfo + public class MenuPaletteEffectInfo : ITraitInfo { public readonly int FadeLength = 10; - public object Create(ActorInitializer init) { return new CncMenuPaletteEffect(this); } + public object Create(ActorInitializer init) { return new MenuPaletteEffect(this); } } - public class CncMenuPaletteEffect : IPaletteModifier, ITickRender + public class MenuPaletteEffect : IPaletteModifier, ITickRender { public enum EffectType { None, Black, Desaturated } - public readonly CncMenuPaletteEffectInfo Info; + public readonly MenuPaletteEffectInfo Info; int remainingFrames; EffectType from = EffectType.Black; EffectType to = EffectType.Black; - public CncMenuPaletteEffect(CncMenuPaletteEffectInfo info) { Info = info; } + public MenuPaletteEffect(MenuPaletteEffectInfo info) { Info = info; } public void Fade(EffectType type) { diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 1e2f11951a..dc186b9443 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -123,6 +123,7 @@ + @@ -401,7 +402,7 @@ - + @@ -412,6 +413,7 @@ + diff --git a/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs deleted file mode 100644 index 7bcf434fb5..0000000000 --- a/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs +++ /dev/null @@ -1,133 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2013 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets.Logic -{ - public class MainMenuButtonsLogic - { - enum MenuType { Main, None } - MenuType Menu = MenuType.Main; - - Widget rootMenu; - - [ObjectCreator.UseCtor] - public MainMenuButtonsLogic(Widget widget) - { - rootMenu = widget; - rootMenu.IsVisible = () => Menu == MenuType.Main; - - var versionLabel = Ui.Root.GetOrNull("VERSION_LABEL"); - if (versionLabel != null) - versionLabel.Text = Game.modData.Manifest.Mod.Version; - - widget.Get("MAINMENU_BUTTON_JOIN").OnClick = () => OpenGamePanel("JOINSERVER_BG"); - widget.Get("MAINMENU_BUTTON_CREATE").OnClick = () => OpenGamePanel("CREATESERVER_BG"); - widget.Get("MAINMENU_BUTTON_DIRECTCONNECT").OnClick = () => OpenGamePanel("DIRECTCONNECT_BG"); - - widget.Get("MAINMENU_BUTTON_SETTINGS").OnClick = () => - { - Menu = MenuType.None; - Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main } - }); - }; - - widget.Get("MAINMENU_BUTTON_MUSIC").OnClick = () => - { - Menu = MenuType.None; - Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main } - }); - }; - - widget.Get("MAINMENU_BUTTON_MODS").OnClick = () => - { - Menu = MenuType.None; - Ui.OpenWindow("MODS_PANEL", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main }, - { "onSwitch", RemoveShellmapUI } - }); - }; - - widget.Get("MAINMENU_BUTTON_CREDITS").OnClick = () => - { - Menu = MenuType.None; - Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main }, - }); - }; - - widget.Get("MAINMENU_BUTTON_REPLAY_VIEWER").OnClick = () => - { - Menu = MenuType.None; - Ui.OpenWindow("REPLAYBROWSER_BG", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main }, - { "onStart", RemoveShellmapUI } - }); - }; - - var assetBrowserButton = widget.Get("MAINMENU_BUTTON_ASSET_BROWSER"); - assetBrowserButton.OnClick = () => - { - Menu = MenuType.None; - Game.OpenWindow("ASSETBROWSER_BG", new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main } - }); - }; - - var quitButton = widget.Get("MAINMENU_BUTTON_QUIT"); - quitButton.OnClick = () => Game.Exit(); - - // Hide developer-specific buttons - if (Game.Settings.Debug.DeveloperMenu == false) - { - assetBrowserButton.IsVisible = () => false; - var offset = assetBrowserButton.Bounds.Y - quitButton.Bounds.Y; - quitButton.Bounds.Y += offset; - rootMenu.Bounds.Height += offset; - rootMenu.Bounds.Y -= offset/2; - } - } - - void RemoveShellmapUI() - { - rootMenu.Parent.RemoveChild(rootMenu); - } - - void OpenGamePanel(string id) - { - Menu = MenuType.None; - Ui.OpenWindow(id, new WidgetArgs() - { - { "onExit", () => Menu = MenuType.Main }, - { "openLobby", () => OpenLobbyPanel() } - }); - } - - void OpenLobbyPanel() - { - Menu = MenuType.None; - Game.OpenWindow("SERVER_LOBBY", new WidgetArgs() - { - { "onExit", () => { Game.Disconnect(); Menu = MenuType.Main; } }, - { "onStart", RemoveShellmapUI }, - { "addBots", false } - }); - } - } -} diff --git a/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs new file mode 100644 index 0000000000..9d000a3463 --- /dev/null +++ b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs @@ -0,0 +1,143 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using System.Net; +using OpenRA.Widgets; + +namespace OpenRA.Mods.RA.Widgets.Logic +{ + public class MainMenuLogic + { + protected enum MenuType { Main, Extras, None } + + protected MenuType menuType = MenuType.Main; + Widget rootMenu; + + [ObjectCreator.UseCtor] + public MainMenuLogic(Widget widget, World world) + { + rootMenu = widget; + rootMenu.Get("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version; + + // Menu buttons + var mainMenu = widget.Get("MAIN_MENU"); + mainMenu.IsVisible = () => menuType == MenuType.Main; + + mainMenu.Get("SINGLEPLAYER_BUTTON").OnClick = StartSkirmishGame; + + mainMenu.Get("MULTIPLAYER_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs + { + { "onStart", RemoveShellmapUI }, + { "onExit", () => menuType = MenuType.Main } + }); + }; + + mainMenu.Get("MODS_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("MODS_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Main }, + { "onSwitch", RemoveShellmapUI } + }); + }; + + mainMenu.Get("SETTINGS_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Game.OpenWindow("SETTINGS_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Main } + }); + }; + + mainMenu.Get("EXTRAS_BUTTON").OnClick = () => menuType = MenuType.Extras; + + mainMenu.Get("QUIT_BUTTON").OnClick = Game.Exit; + + // Extras menu + var extrasMenu = widget.Get("EXTRAS_MENU"); + extrasMenu.IsVisible = () => menuType == MenuType.Extras; + + extrasMenu.Get("REPLAYS_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Extras }, + { "onStart", RemoveShellmapUI } + }); + }; + + extrasMenu.Get("MUSIC_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Extras }, + }); + }; + + var assetBrowserButton = extrasMenu.GetOrNull("ASSETBROWSER_BUTTON"); + if (assetBrowserButton != null) + assetBrowserButton.OnClick = () => + { + menuType = MenuType.None; + Game.OpenWindow("ASSETBROWSER_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Extras }, + }); + }; + + extrasMenu.Get("CREDITS_BUTTON").OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("CREDITS_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Extras }, + }); + }; + + extrasMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; + } + + void RemoveShellmapUI() + { + rootMenu.Parent.RemoveChild(rootMenu); + } + + void OpenSkirmishLobbyPanel() + { + menuType = MenuType.None; + Game.OpenWindow("SERVER_LOBBY", new WidgetArgs + { + { "onExit", () => { Game.Disconnect(); menuType = MenuType.Main; } }, + { "onStart", RemoveShellmapUI }, + { "addBots", true } + }); + } + + void StartSkirmishGame() + { + var map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map); + Game.Settings.Server.Map = map; + Game.Settings.Save(); + + ConnectionLogic.Connect(IPAddress.Loopback.ToString(), + Game.CreateLocalServer(map), + "", + OpenSkirmishLobbyPanel, + () => { Game.CloseServer(); menuType = MenuType.Main; }); + } + } +} diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index 364549df5e..b8abe157ea 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -23,8 +23,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic { GameServer currentServer; ScrollItemWidget serverTemplate; - Action OpenLobby; - Action OnExit; + + Action onStart; + Action onExit; enum SearchStatus { Fetching, Failed, NoGames, Hidden } SearchStatus searchStatus = SearchStatus.Fetching; @@ -38,19 +39,20 @@ namespace OpenRA.Mods.RA.Widgets.Logic { switch (searchStatus) { - case SearchStatus.Fetching: return "Fetching game list..."; - case SearchStatus.Failed: return "Failed to contact master server."; - case SearchStatus.NoGames: return "No games found."; - default: return ""; + case SearchStatus.Fetching: return "Fetching game list..."; + case SearchStatus.Failed: return "Failed to contact master server."; + case SearchStatus.NoGames: return "No games found."; + default: return ""; } } [ObjectCreator.UseCtor] - public ServerBrowserLogic(Widget widget, Action openLobby, Action onExit) + public ServerBrowserLogic(Widget widget, Action onStart, Action onExit) { var panel = widget; - OpenLobby = openLobby; - OnExit = onExit; + this.onStart = onStart; + this.onExit = onExit; + var sl = panel.Get("SERVER_LIST"); // Menu buttons @@ -58,6 +60,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching; refreshButton.OnClick = () => ServerList.Query(games => RefreshServerList(panel, games)); + panel.Get("DIRECTCONNECT_BUTTON").OnClick = OpenDirectConnectPanel; + panel.Get("CREATE_BUTTON").OnClick = OpenCreateServerPanel; + var join = panel.Get("JOIN_BUTTON"); join.IsDisabled = () => currentServer == null || !currentServer.CanJoin(); join.OnClick = () => Join(currentServer); @@ -106,6 +111,34 @@ namespace OpenRA.Mods.RA.Widgets.Logic ServerList.Query(games => RefreshServerList(panel, games)); } + void OpenLobby() + { + Game.OpenWindow("SERVER_LOBBY", new WidgetArgs + { + { "onExit", Game.Disconnect }, + { "onStart", onStart }, + { "addBots", false } + }); + } + + void OpenDirectConnectPanel() + { + Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs + { + { "openLobby", OpenLobby }, + { "onExit", () => { } } + }); + } + + void OpenCreateServerPanel() + { + Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs + { + { "openLobby", OpenLobby }, + { "onExit", () => { } } + }); + } + void Join(GameServer server) { if (server == null || !server.CanJoin()) @@ -114,8 +147,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var host = server.Address.Split(':')[0]; var port = int.Parse(server.Address.Split(':')[1]); - Ui.CloseWindow(); - ConnectionLogic.Connect(host, port, "", OpenLobby, OnExit); + ConnectionLogic.Connect(host, port, "", OpenLobby, onExit); } string GetPlayersLabel(GameServer game) @@ -164,10 +196,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic { if ((game.State == (int)ServerState.GameStarted) && !showStarted) return true; - + if ((game.State == (int)ServerState.WaitingPlayers) && !showWaiting) return true; - + if ((game.Players == 0) && !showEmpty) return true; @@ -230,7 +262,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var state = item.Get("STATE"); state.GetText = () => GetStateLabel(game); - + var ip = item.Get("IP"); ip.GetText = () => game.Address; diff --git a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs index 7ca51a97e5..cb95920bb6 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs @@ -356,7 +356,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic BindCheckboxPref(panel, "PERFGRAPH_CHECKBOX", ds, "PerfGraph"); BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SanityCheckUnsyncedCode"); BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug"); - BindCheckboxPref(panel, "DEVELOPER_MENU_CHECKBOX", ds, "DeveloperMenu"); BindCheckboxPref(panel, "CRASH_DIALOG_CHECKBOX", ds, "ShowFatalErrorDialog"); return () => { }; @@ -377,7 +376,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic ds.PerfGraph = dds.PerfGraph; ds.SanityCheckUnsyncedCode = dds.SanityCheckUnsyncedCode; ds.BotDebug = dds.BotDebug; - ds.DeveloperMenu = dds.DeveloperMenu; ds.ShowFatalErrorDialog = dds.ShowFatalErrorDialog; }; } diff --git a/OpenRA.Mods.RA/Widgets/Logic/ShellmapDesaturationLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ShellmapDesaturationLogic.cs new file mode 100644 index 0000000000..cb340ad8ef --- /dev/null +++ b/OpenRA.Mods.RA/Widgets/Logic/ShellmapDesaturationLogic.cs @@ -0,0 +1,23 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Mods.RA.Widgets.Logic +{ + public class ShellmapDesaturationLogic + { + [ObjectCreator.UseCtor] + public ShellmapDesaturationLogic(World world) + { + var paletteEffect = world.WorldActor.TraitOrDefault(); + if (paletteEffect != null) + paletteEffect.Fade(MenuPaletteEffect.EffectType.Desaturated); + } + } +} diff --git a/mods/cnc/chrome/mainmenu.yaml b/mods/cnc/chrome/mainmenu.yaml index 65e542a882..7a74a2c61d 100644 --- a/mods/cnc/chrome/mainmenu.yaml +++ b/mods/cnc/chrome/mainmenu.yaml @@ -1,8 +1,10 @@ Container@MENU_BACKGROUND: Width:WINDOW_RIGHT Height:WINDOW_BOTTOM - Logic:CncMenuLogic + Logic:CncMainMenuLogic Children: + Container@SHELLMAP_DESATURATION: + Logic:ShellmapDesaturationLogic Container@SHELLMAP_DECORATIONS: Children: Image@RETICLE: @@ -57,7 +59,7 @@ Container@MENU_BACKGROUND: Container@MENUS: X:(WINDOW_RIGHT-WIDTH)/2 Y:WINDOW_BOTTOM-33-HEIGHT-10 - Width:740 + Width:890 Height:35 Children: Container@MAIN_MENU: @@ -72,7 +74,7 @@ Container@MENU_BACKGROUND: Align:Center Font:Bold Contrast:True - Button@SOLO_BUTTON: + Button@SINGLEPLAYER_BUTTON: X:0 Y:0 Width:140 @@ -84,72 +86,40 @@ Container@MENU_BACKGROUND: Width:140 Height:35 Text:Multiplayer - Button@SETTINGS_BUTTON: - X:300 - Y:0 - Width:140 - Height:35 - Text:Options Button@MODS_BUTTON: - X:450 + X:300 Y:0 Width:140 Height:35 Text:Mods - Button@QUIT_BUTTON: + Button@SETTINGS_BUTTON: + X:450 + Y:0 + Width:140 + Height:35 + Text:Settings + Button@EXTRAS_BUTTON: X:600 Y:0 Width:140 Height:35 + Text:Extras + Button@QUIT_BUTTON: + X:750 + Y:0 + Width:140 + Height:35 Text:Quit - Container@MULTIPLAYER_MENU: - Width:PARENT_RIGHT - Visible:false - Children: - Label@MULTIPLAYER_MENU_TITLE: - X:0 - Y:0-30 - Width:PARENT_RIGHT - Height:20 - Text:Multiplayer - Align:Center - Font:Bold - Contrast:True - Button@CREATE_BUTTON: - X:0 - Y:0 - Width:140 - Height:35 - Text:Create Server - Button@JOIN_BUTTON: - X:150 - Y:0 - Width:140 - Height:35 - Text:Find Server - Button@DIRECTCONNECT_BUTTON: - X:300 - Y:0 - Width:140 - Height:35 - Text:Direct Connect - Button@BACK_BUTTON: - Key:escape - X:600 - Y:0 - Width:140 - Height:35 - Text:Back - Container@SETTINGS_MENU: + Container@EXTRAS_MENU: Width:PARENT_RIGHT Visible:False Children: - Label@OPTIONS_MENU_TITLE: + Label@EXTRAS_MENU_TITLE: X:0 Y:0-30 Width:PARENT_RIGHT Height:20 - Text:Options + Text:Extras Align:Center Font:Bold Contrast:True @@ -165,21 +135,15 @@ Container@MENU_BACKGROUND: Width:140 Height:35 Text:Music - Button@SETTINGS_BUTTON: - X:300 - Y:0 - Width:140 - Height:35 - Text:Settings Button@CREDITS_BUTTON: - X:450 + X:300 Y:0 Width:140 Height:35 Text:Credits Button@BACK_BUTTON: Key:escape - X:600 + X:750 Y:0 Width:140 Height:35 @@ -205,4 +169,4 @@ Container@MENU_BACKGROUND: X:10 Y:10 Width:200 - Height:200 + Height:200 \ No newline at end of file diff --git a/mods/cnc/chrome/serverbrowser.yaml b/mods/cnc/chrome/serverbrowser.yaml index 04a53244d2..276f3b20bf 100644 --- a/mods/cnc/chrome/serverbrowser.yaml +++ b/mods/cnc/chrome/serverbrowser.yaml @@ -6,7 +6,7 @@ Container@SERVERBROWSER_PANEL: Height:535 Children: Label@TITLE: - Text:Find Server + Text:Multiplayer Width:740 Y:0-25 Font:BigBold @@ -19,38 +19,44 @@ Container@SERVERBROWSER_PANEL: Children: Label@SHOW_LABEL_TITLE: X:20 - Y:10 + Y:465 Width:20 Height:25 Text:Show: Font:Bold Checkbox@WAITING_FOR_PLAYERS: X:80 - Y:13 + Y:468 Width:100 Height:20 Text:Waiting Checkbox@EMPTY: X:180 - Y:13 + Y:468 Width:100 Height:20 Text:Empty Checkbox@ALREADY_STARTED: X:280 - Y:13 + Y:468 Width:100 Height:20 Text:Started Checkbox@INCOMPATIBLE_VERSION: X:380 - Y:13 + Y:468 Width:100 Height:20 Text:Incompatible + Button@REFRESH_BUTTON: + X:PARENT_RIGHT - WIDTH - 20 + Y:465 + Width:100 + Height:25 + Text:Refresh ScrollPanel@SERVER_LIST: X:15 - Y:45 + Y:15 Width:700 Height:440 Children: @@ -120,12 +126,18 @@ Container@SERVERBROWSER_PANEL: Width:140 Height:35 Text:Back - Button@REFRESH_BUTTON: + Button@CREATE_BUTTON: + X:PARENT_RIGHT - 140 - 10 - 140 - 10 - 140 + Y:499 + Width:140 + Height:35 + Text:Create + Button@DIRECTCONNECT_BUTTON: X:PARENT_RIGHT - 140 - 10 - 140 Y:499 Width:140 Height:35 - Text:Refresh + Text:Direct IP Button@JOIN_BUTTON: Key:return X:PARENT_RIGHT - 140 diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index b03fa4fcd1..3f48ed3ae2 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -427,13 +427,6 @@ Container@SETTINGS_PANEL: Height:20 Font:Regular Text:Show Performance Graph - Checkbox@DEVELOPER_MENU_CHECKBOX: - X:15 - Y:100 - Width:300 - Height:20 - Font:Regular - Text:Enable Asset Browser (requires restart) Label@HOTKEY_TITLE: Y:140 Width:PARENT_RIGHT diff --git a/mods/cnc/rules/system-world.yaml b/mods/cnc/rules/system-world.yaml index 086e9b959d..45b5f8cc7d 100644 --- a/mods/cnc/rules/system-world.yaml +++ b/mods/cnc/rules/system-world.yaml @@ -3,7 +3,7 @@ World: ActorMap: LoadWidgetAtGameStart: Widget: INGAME_ROOT - CncMenuPaletteEffect: + MenuPaletteEffect: CloakPaletteEffect: ScreenShaker: NukePaletteEffect: diff --git a/mods/d2k/chrome/mainmenu.yaml b/mods/d2k/chrome/mainmenu.yaml index aecf6dac50..c268749e45 100644 --- a/mods/d2k/chrome/mainmenu.yaml +++ b/mods/d2k/chrome/mainmenu.yaml @@ -1,105 +1,139 @@ -Background@MAINMENU: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:250 - Height:500 - Visible:true - Logic:MainMenuButtonsLogic +Container@MAINMENU: + Logic:MainMenuLogic Children: - Label@MAINMENU_LABEL_TITLE: - X:0 - Y:20 - Width:250 - Height:25 - Text:OpenD2k Main Menu - Align:Center - Font:Bold - Button@MAINMENU_BUTTON_JOIN: - X:45 - Y:70 - Width:160 - Height:25 - Text:Join Game - Font:Bold - Button@MAINMENU_BUTTON_CREATE: - X:45 - Y:110 - Width:160 - Height:25 - Text:Create Game - Font:Bold - Button@MAINMENU_BUTTON_DIRECTCONNECT: - X:45 - Y:150 - Width:160 - Height:25 - Text:Direct Connect - Font:Bold - Button@MAINMENU_BUTTON_SETTINGS: - X:45 - Y:190 - Width:160 - Height:25 - Text:Settings - Font:Bold - Button@MAINMENU_BUTTON_MODS: - X:45 - Y:230 - Width:160 - Height:25 - Text:Mods - Font:Bold - Button@MAINMENU_BUTTON_MUSIC: - X:45 - Y:270 - Width:160 - Height:25 - Text:Music - Font:Bold - Button@MAINMENU_BUTTON_REPLAY_VIEWER: - X:45 - Y:310 - Width:160 - Height:25 - Text:Replay Viewer - Font:Bold - Button@MAINMENU_BUTTON_CREDITS: - X:45 - Y:350 - Width:160 - Height:25 - Text:Credits - Font:Bold - Button@MAINMENU_BUTTON_ASSET_BROWSER: - X:45 - Y:390 - Width:160 - Height:25 - Text:Asset Browser - Font:Bold - Button@MAINMENU_BUTTON_QUIT: - X:45 - Y:430 - Width:160 - Height:25 - Text:Quit - Font:Bold -Background@PERF_BG: - ClickThrough:true - Background:dialog4 - Logic:PerfDebugLogic - X:10 - Y:WINDOW_BOTTOM - 250 - Width: 210 - Height: 250 - Children: - PerfGraph@GRAPH: - X:5 - Y:5 + Label@VERSION_LABEL: + X:WINDOW_RIGHT - 10 + Y:WINDOW_BOTTOM - 20 + Align:Right + Font:Regular + Contrast:True + Container@MENUS: + X:100 + Y:WINDOW_BOTTOM/2-HEIGHT/2 Width:200 - Height:200 - Label@TEXT: - X:20 - Y:205 - Width:170 - Height:40 \ No newline at end of file + Height:320 + Children: + Background@MAIN_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@MAINMENU_LABEL_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:OpenRA + Align:Center + Font:Bold + Button@SINGLEPLAYER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Singleplayer + Font:Bold + Button@MULTIPLAYER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Multiplayer + Font:Bold + Button@MODS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:140 + Width:140 + Height:30 + Text:Mods + Font:Bold + Button@SETTINGS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:180 + Width:140 + Height:30 + Text:Settings + Font:Bold + Button@EXTRAS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:220 + Width:140 + Height:30 + Text:Extras + Font:Bold + Button@QUIT_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:260 + Width:140 + Height:30 + Text:Quit + Font:Bold + Background@EXTRAS_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@EXTRAS_MENU_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:Extras + Align:Center + Font:Bold + Button@REPLAYS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Replays + Font:Bold + Button@MUSIC_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Music + Font:Bold + Button@ASSETBROWSER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:140 + Width:140 + Height:30 + Text:Asset Browser + Font:Bold + Button@CREDITS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:180 + Width:140 + Height:30 + Text:Credits + Font:Bold + Button@BACK_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Key:escape + Y:260 + Width:140 + Height:30 + Text:Back + Font:Bold + Container@PERFORMANCE_INFO: + Logic:PerfDebugLogic + Children: + Label@PERF_TEXT: + X:30 + Y:WINDOW_BOTTOM - 70 + Width:170 + Height:40 + Contrast:true + Background@GRAPH_BG: + ClickThrough:true + Background:dialog4 + X:WINDOW_RIGHT - 240 + Y:WINDOW_BOTTOM - 240 + Width:210 + Height:210 + Children: + PerfGraph@GRAPH: + X:5 + Y:5 + Width:200 + Height:200 \ No newline at end of file diff --git a/mods/ra/chrome/assetbrowser.yaml b/mods/ra/chrome/assetbrowser.yaml index ef5fea2547..bf01849800 100644 --- a/mods/ra/chrome/assetbrowser.yaml +++ b/mods/ra/chrome/assetbrowser.yaml @@ -1,4 +1,4 @@ -Background@ASSETBROWSER_BG: +Background@ASSETBROWSER_PANEL: Logic:AssetBrowserLogic X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 diff --git a/mods/ra/chrome/create-server.yaml b/mods/ra/chrome/create-server.yaml index c75bcf4b17..1b3306f23f 100644 --- a/mods/ra/chrome/create-server.yaml +++ b/mods/ra/chrome/create-server.yaml @@ -1,4 +1,4 @@ -Background@CREATESERVER_BG: +Background@CREATESERVER_PANEL: Logic:ServerCreationLogic X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 diff --git a/mods/ra/chrome/directconnect.yaml b/mods/ra/chrome/directconnect.yaml index afaf2524d9..b80e318dbc 100644 --- a/mods/ra/chrome/directconnect.yaml +++ b/mods/ra/chrome/directconnect.yaml @@ -1,4 +1,4 @@ -Background@DIRECTCONNECT_BG: +Background@DIRECTCONNECT_PANEL: Logic:DirectConnectLogic X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 @@ -10,7 +10,7 @@ Background@DIRECTCONNECT_BG: Y:20 Width:400 Height:25 - Text:Direct Connect + Text:Connect to Server Align:Center Font:Bold Label@ADDRESS_LABEL: @@ -47,4 +47,4 @@ Background@DIRECTCONNECT_BG: Height:25 Text:Cancel Font:Bold - Key:escape + Key:escape diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index 41d81c7956..2cb59c1308 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -1,4 +1,5 @@ Container@MAINMENU: + Logic:MainMenuLogic Children: Background@BORDER: Background:mainmenu-border @@ -19,91 +20,114 @@ Container@MAINMENU: Align:Center Font:Regular Contrast:True - Background@MAINMENU_BG: - X:(WINDOW_RIGHT - WIDTH)/8 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:250 - Height:605 - Logic:MainMenuButtonsLogic + Container@MENUS: + X:100 + Y:WINDOW_BOTTOM/2-HEIGHT/2 + Width:200 + Height:320 Children: - Label@MAINMENU_LABEL_TITLE: - X:0 - Y:20 - Width:250 - Height:35 - Text:OpenRA - Align:Center - Font:Title - Button@MAINMENU_BUTTON_JOIN: - X:45 - Y:80 - Width:160 - Height:35 - Text:Join Game - Font:Bold - Button@MAINMENU_BUTTON_CREATE: - X:45 - Y:130 - Width:160 - Height:35 - Text:Create Game - Font:Bold - Button@MAINMENU_BUTTON_DIRECTCONNECT: - X:45 - Y:180 - Width:160 - Height:35 - Text:Direct Connect - Font:Bold - Button@MAINMENU_BUTTON_SETTINGS: - X:45 - Y:230 - Width:160 - Height:35 - Text:Settings - Font:Bold - Button@MAINMENU_BUTTON_MODS: - X:45 - Y:280 - Width:160 - Height:35 - Text:Mods - Font:Bold - Button@MAINMENU_BUTTON_MUSIC: - X:45 - Y:330 - Width:160 - Height:35 - Text:Music - Font:Bold - Button@MAINMENU_BUTTON_REPLAY_VIEWER: - X:45 - Y:380 - Width:160 - Height:35 - Text:Replay Viewer - Font:Bold - Button@MAINMENU_BUTTON_CREDITS: - X:45 - Y:430 - Width:160 - Height:35 - Text:Credits - Font:Bold - Button@MAINMENU_BUTTON_ASSET_BROWSER: - X:45 - Y:480 - Width:160 - Height:35 - Text:Asset Browser - Font:Bold - Button@MAINMENU_BUTTON_QUIT: - X:45 - Y:530 - Width:160 - Height:35 - Text:Quit - Font:Bold + Background@MAIN_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@MAINMENU_LABEL_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:OpenRA + Align:Center + Font:Bold + Button@SINGLEPLAYER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Singleplayer + Font:Bold + Button@MULTIPLAYER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Multiplayer + Font:Bold + Button@MODS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:140 + Width:140 + Height:30 + Text:Mods + Font:Bold + Button@SETTINGS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:180 + Width:140 + Height:30 + Text:Settings + Font:Bold + Button@EXTRAS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:220 + Width:140 + Height:30 + Text:Extras + Font:Bold + Button@QUIT_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:260 + Width:140 + Height:30 + Text:Quit + Font:Bold + Background@EXTRAS_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@EXTRAS_MENU_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:Extras + Align:Center + Font:Bold + Button@REPLAYS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Replays + Font:Bold + Button@MUSIC_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Music + Font:Bold + Button@ASSETBROWSER_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:140 + Width:140 + Height:30 + Text:Asset Browser + Font:Bold + Button@CREDITS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:180 + Width:140 + Height:30 + Text:Credits + Font:Bold + Button@BACK_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Key:escape + Y:260 + Width:140 + Height:30 + Text:Back + Font:Bold Container@PERFORMANCE_INFO: Logic:PerfDebugLogic Children: diff --git a/mods/ra/chrome/replaybrowser.yaml b/mods/ra/chrome/replaybrowser.yaml index 45d2be39a1..c2805a4091 100644 --- a/mods/ra/chrome/replaybrowser.yaml +++ b/mods/ra/chrome/replaybrowser.yaml @@ -1,4 +1,4 @@ -Background@REPLAYBROWSER_BG: +Background@REPLAYBROWSER_PANEL: Logic:ReplayBrowserLogic X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 diff --git a/mods/ra/chrome/serverbrowser.yaml b/mods/ra/chrome/serverbrowser.yaml index c763136fa8..8af64582df 100644 --- a/mods/ra/chrome/serverbrowser.yaml +++ b/mods/ra/chrome/serverbrowser.yaml @@ -1,16 +1,16 @@ -Background@JOINSERVER_BG: +Background@SERVERBROWSER_PANEL: Logic:ServerBrowserLogic X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 Width:740 - Height:505 + Height:500 Children: - Label@JOINSERVER_LABEL_TITLE: + Label@MULTIPLAYER_LABEL_TITLE: X:0 Y:15 Width:PARENT_RIGHT Height:25 - Text:Join Server + Text:Multiplayer Align:Center Font:Bold Label@SHOW_LABEL_TITLE: @@ -48,7 +48,7 @@ Background@JOINSERVER_BG: X:20 Y:80 Width:700 - Height:355 + Height:360 Children: ScrollItem@SERVER_TEMPLATE: Width:PARENT_RIGHT-27 @@ -115,6 +115,20 @@ Background@JOINSERVER_BG: Height:25 Text:Refresh Font:Bold + Button@CREATE_BUTTON: + X:PARENT_RIGHT - 120 - 120 - 120 - 120 + Y:PARENT_BOTTOM - 45 + Width:100 + Height:25 + Text:Create + Font:Bold + Button@DIRECTCONNECT_BUTTON: + X:PARENT_RIGHT - 120 - 120 - 120 + Y:PARENT_BOTTOM - 45 + Width:100 + Height:25 + Text:Direct IP + Font:Bold Button@JOIN_BUTTON: X:PARENT_RIGHT - 120 - 120 Y:PARENT_BOTTOM - 45 diff --git a/mods/ra/chrome/settings.yaml b/mods/ra/chrome/settings.yaml index 094e3c13c0..bd7eff143a 100644 --- a/mods/ra/chrome/settings.yaml +++ b/mods/ra/chrome/settings.yaml @@ -415,13 +415,6 @@ Background@SETTINGS_PANEL: Height:20 Font:Regular Text:Show Performance Graph - Checkbox@DEVELOPER_MENU_CHECKBOX: - X:15 - Y:100 - Width:300 - Height:20 - Font:Regular - Text:Enable Asset Browser (requires restart) Label@HOTKEY_TITLE: Y:140 Width:PARENT_RIGHT