diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index dddbb9e9b7..710b030414 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -1,4 +1,4 @@ - + Debug @@ -92,7 +92,6 @@ - diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index 316e660252..915afa106b 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -8,10 +8,10 @@ */ #endregion -using System; using System.Drawing; -using OpenRA.Mods.RA.Orders; using OpenRA.Mods.RA.Buildings; +using OpenRA.Mods.RA.Orders; +using OpenRA.Mods.RA.Widgets; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.D2k/D2kLoadScreen.cs b/OpenRA.Mods.D2k/D2kLoadScreen.cs index 69f32aef68..a112e1a434 100644 --- a/OpenRA.Mods.D2k/D2kLoadScreen.cs +++ b/OpenRA.Mods.D2k/D2kLoadScreen.cs @@ -87,9 +87,8 @@ namespace OpenRA.Mods.D2k } else { - Game.LoadShellMap(); Ui.ResetAll(); - Ui.OpenWindow("MAINMENU_BG"); + Game.LoadShellMap(); } } } diff --git a/OpenRA.Mods.RA/OpenWidgetAtGameStart.cs b/OpenRA.Mods.RA/LoadWidgetAtGameStart.cs similarity index 57% rename from OpenRA.Mods.RA/OpenWidgetAtGameStart.cs rename to OpenRA.Mods.RA/LoadWidgetAtGameStart.cs index d5fc347109..d284e4532d 100644 --- a/OpenRA.Mods.RA/OpenWidgetAtGameStart.cs +++ b/OpenRA.Mods.RA/LoadWidgetAtGameStart.cs @@ -10,40 +10,9 @@ using OpenRA.Traits; using OpenRA.Widgets; -using System.Collections.Generic; namespace OpenRA.Mods.RA { - // Legacy crap - public class OpenWidgetAtGameStartInfo : ITraitInfo - { - public readonly string Widget = "INGAME_ROOT"; - public readonly string ObserverWidget = null; - - public object Create(ActorInitializer init) { return new OpenWidgetAtGameStart(this); } - } - - public class OpenWidgetAtGameStart: IWorldLoaded - { - readonly OpenWidgetAtGameStartInfo Info; - public OpenWidgetAtGameStart(OpenWidgetAtGameStartInfo Info) - { - this.Info = Info; - } - - public void WorldLoaded(World world) - { - // Remove all open widgets - Ui.ResetAll(); - - if (world.LocalPlayer != null) - Game.OpenWindow(world, Info.Widget); - else if (Info.ObserverWidget != null) - Game.OpenWindow(world, Info.ObserverWidget); - } - } - - // New version public class LoadWidgetAtGameStartInfo : ITraitInfo { public readonly string Widget = null; diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index d19315ef96..e04f5a9a77 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -267,7 +267,7 @@ - + @@ -370,6 +370,8 @@ + + @@ -378,7 +380,6 @@ - diff --git a/OpenRA.Mods.RA/RALoadScreen.cs b/OpenRA.Mods.RA/RALoadScreen.cs index d44b4aba74..3f7871f875 100644 --- a/OpenRA.Mods.RA/RALoadScreen.cs +++ b/OpenRA.Mods.RA/RALoadScreen.cs @@ -90,11 +90,7 @@ namespace OpenRA.Mods.RA Ui.OpenWindow(Info["InstallerMenuWidget"], args); } else - { Game.LoadShellMap(); - Ui.ResetAll(); - Ui.OpenWindow("MAINMENU_BG"); - } } } } diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs index cad508d877..93b6f4f9c1 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * 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, @@ -19,99 +19,101 @@ namespace OpenRA.Mods.RA.Widgets.Logic public class IngameChromeLogic { Widget gameRoot; + Widget playerRoot; + World world; [ObjectCreator.UseCtor] public IngameChromeLogic(World world) { - var r = Ui.Root; - gameRoot = r.Get("INGAME_ROOT"); - var optionsBG = gameRoot.Get("INGAME_OPTIONS_BG"); + this.world = world; + gameRoot = Ui.Root.Get("INGAME_ROOT"); + playerRoot = gameRoot.Get("PLAYER_ROOT"); - // TODO: RA's broken UI wiring makes it unreasonably difficult to - // cache and restore the previous pause state, so opening/closing - // the menu in a paused singleplayer game will un-pause the game. - r.Get("INGAME_OPTIONS_BUTTON").OnClick = () => + InitRootWidgets(); + if (world.LocalPlayer == null) + InitObserverWidgets(); + else + InitPlayerWidgets(); + } + + void InitRootWidgets() + { + var cachedPause = false; + Widget optionsBG = null; + optionsBG = Game.LoadWidget(world, "INGAME_OPTIONS_BG", Ui.Root, new WidgetArgs { - optionsBG.Visible = !optionsBG.Visible; - if (world.LobbyInfo.IsSinglePlayer) - world.IssueOrder(Order.PauseGame(true)); - }; - - var cheatsButton = gameRoot.Get("CHEATS_BUTTON"); - cheatsButton.OnClick = () => + { "onExit", () => + { + optionsBG.Visible = false; + + if (world.LobbyInfo.IsSinglePlayer) + world.IssueOrder(Order.PauseGame(cachedPause)); + } + } + }); + + gameRoot.Get("INGAME_OPTIONS_BUTTON").OnClick = () => { - Game.OpenWindow("CHEATS_PANEL", new WidgetArgs() {{"onExit", () => {} }}); + optionsBG.Visible ^= true; + if (optionsBG.Visible) + { + cachedPause = world.Paused; + + if (world.LobbyInfo.IsSinglePlayer) + world.IssueOrder(Order.PauseGame(true)); + } + else + world.IssueOrder(Order.PauseGame(cachedPause)); }; - cheatsButton.IsVisible = () => world.LocalPlayer != null && world.LobbyInfo.GlobalSettings.AllowCheats; + + Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs()); + } + + void InitObserverWidgets() + { + var observerWidgets = Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs()); + + Game.LoadWidget(world, "OBSERVER_STATS", observerWidgets, new WidgetArgs()); + observerWidgets.Get("INGAME_STATS_BUTTON").OnClick = () => gameRoot.Get("OBSERVER_STATS").Visible ^= true; + } + + void InitPlayerWidgets() + { + var playerWidgets = Game.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs()); + + Widget cheats = null; + cheats = Game.LoadWidget(world, "CHEATS_PANEL", playerWidgets, new WidgetArgs + { + { "onExit", () => cheats.Visible = false } + }); + var cheatsButton = playerWidgets.Get("CHEATS_BUTTON"); + cheatsButton.OnClick = () => cheats.Visible ^= true; + cheatsButton.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats; var iop = world.WorldActor.TraitsImplementing().FirstOrDefault(); if (iop != null && iop.ObjectivesPanel != null) { - var objectivesButton = gameRoot.Get("OBJECTIVES_BUTTON"); - var objectivesWidget = Game.LoadWidget(world, iop.ObjectivesPanel, Ui.Root, new WidgetArgs()); - objectivesWidget.Visible = false; - objectivesButton.OnClick += () => objectivesWidget.Visible = !objectivesWidget.Visible; - objectivesButton.IsVisible = () => world.LocalPlayer != null; + var objectivesButton = playerWidgets.Get("OBJECTIVES_BUTTON"); + var objectivesWidget = Game.LoadWidget(world, iop.ObjectivesPanel, playerWidgets, new WidgetArgs()); + objectivesButton.Visible = true; + objectivesButton.OnClick += () => objectivesWidget.Visible ^= true; } - var moneybin = gameRoot.Get("INGAME_MONEY_BIN"); - moneybin.Get("SELL").GetKey = _ => Game.Settings.Keys.SellKey; - moneybin.Get("POWER_DOWN").GetKey = _ => Game.Settings.Keys.PowerDownKey; - moneybin.Get("REPAIR").GetKey = _ => Game.Settings.Keys.RepairKey; + var moneyBin = playerWidgets.Get("INGAME_MONEY_BIN"); + moneyBin.Get("SELL").GetKey = _ => Game.Settings.Keys.SellKey; + moneyBin.Get("POWER_DOWN").GetKey = _ => Game.Settings.Keys.PowerDownKey; + moneyBin.Get("REPAIR").GetKey = _ => Game.Settings.Keys.RepairKey; - var chatPanel = Game.LoadWidget(world, "CHAT_PANEL", Ui.Root, new WidgetArgs()); - gameRoot.AddChild(chatPanel); - - optionsBG.Get("DISCONNECT").OnClick = () => LeaveGame(optionsBG, world); - optionsBG.Get("SETTINGS").OnClick = () => Ui.OpenWindow("SETTINGS_MENU"); - optionsBG.Get("MUSIC").OnClick = () => Ui.OpenWindow("MUSIC_MENU"); - optionsBG.Get("RESUME").OnClick = () => + var winLossWatcher = playerWidgets.Get("WIN_LOSS_WATCHER"); + winLossWatcher.OnTick = () => { - optionsBG.Visible = false; - if (world.LobbyInfo.IsSinglePlayer) - world.IssueOrder(Order.PauseGame(false)); + if (world.LocalPlayer.WinState != WinState.Undefined) + Game.RunAfterTick(() => + { + playerRoot.RemoveChildren(); + InitObserverWidgets(); + }); }; - - optionsBG.Get("SURRENDER").OnClick = () => - { - optionsBG.Visible = false; - world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false)); - }; - - optionsBG.Get("SURRENDER").IsVisible = () => (world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined); - - var postgameBG = gameRoot.Get("POSTGAME_BG"); - var postgameText = postgameBG.Get("TEXT"); - var postGameObserve = postgameBG.Get("POSTGAME_OBSERVE"); - - var postgameQuit = postgameBG.Get("POSTGAME_QUIT"); - postgameQuit.OnClick = () => LeaveGame(postgameQuit, world); - - postGameObserve.OnClick = () => postgameQuit.Visible = false; - postGameObserve.IsVisible = () => world.LocalPlayer.WinState != WinState.Won; - - postgameBG.IsVisible = () => - { - return postgameQuit.Visible && world.LocalPlayer != null && world.LocalPlayer.WinState != WinState.Undefined; - }; - - - postgameText.GetText = () => - { - var state = world.LocalPlayer.WinState; - return state == WinState.Undefined ? "" : - (state == WinState.Lost ? "YOU ARE DEFEATED" : "YOU ARE VICTORIOUS"); - }; - } - - void LeaveGame(Widget pane, World world) - { - Sound.PlayNotification(null, "Speech", "Leave", world.LocalPlayer.Country.Race); - pane.Visible = false; - Game.Disconnect(); - Game.LoadShellMap(); - Ui.CloseWindow(); - Ui.OpenWindow("MAINMENU_BG"); } } } diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs new file mode 100644 index 0000000000..48fc33b2f7 --- /dev/null +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs @@ -0,0 +1,54 @@ +#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 System; +using OpenRA.Widgets; + +namespace OpenRA.Mods.RA.Widgets.Logic +{ + class IngameMenuLogic + { + [ObjectCreator.UseCtor] + public IngameMenuLogic(Widget widget, World world, Action onExit) + { + widget.Get("DISCONNECT").OnClick = () => + { + onExit(); + LeaveGame(world); + }; + widget.Get("SETTINGS").OnClick = () => + { + widget.Visible = false; + Ui.OpenWindow("SETTINGS_MENU", new WidgetArgs { { "onExit", () => { widget.Visible = true; } } }); + }; + widget.Get("MUSIC").OnClick = () => + { + widget.Visible = false; + Ui.OpenWindow("MUSIC_MENU", new WidgetArgs { { "onExit", () => { widget.Visible = true; } } }); + }; + widget.Get("RESUME").OnClick = () => onExit(); + + widget.Get("SURRENDER").OnClick = () => + { + world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false)); + onExit(); + }; + widget.Get("SURRENDER").IsVisible = () => world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined; + } + + void LeaveGame(World world) + { + Sound.PlayNotification(null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Country.Race); + Game.Disconnect(); + Ui.CloseWindow(); + Game.LoadShellMap(); + } + } +} diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameObserverChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameObserverChromeLogic.cs deleted file mode 100644 index 7f68806f2a..0000000000 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameObserverChromeLogic.cs +++ /dev/null @@ -1,67 +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 OpenRA.Traits; -using OpenRA.Widgets; -using OpenRA.Network; -using System; -using System.Drawing; -using System.Linq; - -namespace OpenRA.Mods.RA.Widgets.Logic -{ - public class IngameObserverChromeLogic - { - Widget gameRoot; - - // WTF duplication - [ObjectCreator.UseCtor] - public IngameObserverChromeLogic(World world) - { - var r = Ui.Root; - gameRoot = r.Get("OBSERVER_ROOT"); - var optionsBG = gameRoot.Get("INGAME_OPTIONS_BG"); - - r.Get("INGAME_OPTIONS_BUTTON").OnClick = () => - { - optionsBG.Visible = !optionsBG.Visible; - if (world.LobbyInfo.IsSinglePlayer) - world.IssueOrder(Order.PauseGame(true)); - }; - - optionsBG.Get("DISCONNECT").OnClick = () => - { - optionsBG.Visible = false; - Game.Disconnect(); - Game.LoadShellMap(); - Ui.CloseWindow(); - Ui.OpenWindow("MAINMENU_BG"); - }; - - optionsBG.Get("SETTINGS").OnClick = () => Ui.OpenWindow("SETTINGS_MENU"); - optionsBG.Get("MUSIC").OnClick = () => Ui.OpenWindow("MUSIC_MENU"); - optionsBG.Get("RESUME").OnClick = () => - { - optionsBG.Visible = false; - if (world.LobbyInfo.IsSinglePlayer) - world.IssueOrder(Order.PauseGame(false)); - }; - optionsBG.Get("SURRENDER").IsVisible = () => false; - - Ui.Root.Get("INGAME_STATS_BUTTON").OnClick = () => gameRoot.Get("OBSERVER_STATS").Visible ^= true; - - if (!world.IsShellmap) - { - var chatPanel = Game.LoadWidget(world, "CHAT_PANEL", Ui.Root, new WidgetArgs()); - gameRoot.AddChild(chatPanel); - } - } - } -} diff --git a/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs index 4008a4c7f5..4cff2b4679 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MainMenuButtonsLogic.cs @@ -14,33 +14,62 @@ 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; Game.modData.WidgetLoader.LoadWidget( new WidgetArgs(), Ui.Root, "PERF_BG" ); + 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 = () => Ui.OpenWindow("SETTINGS_MENU"); - widget.Get("MAINMENU_BUTTON_MUSIC").OnClick = () => Ui.OpenWindow("MUSIC_MENU"); + + widget.Get("MAINMENU_BUTTON_SETTINGS").OnClick = () => + { + Menu = MenuType.None; + Ui.OpenWindow("SETTINGS_MENU", new WidgetArgs() + { + { "onExit", () => Menu = MenuType.Main } + }); + }; + + widget.Get("MAINMENU_BUTTON_MUSIC").OnClick = () => + { + Menu = MenuType.None; + Ui.OpenWindow("MUSIC_MENU", new WidgetArgs() + { + { "onExit", () => Menu = MenuType.Main } + }); + }; widget.Get("MAINMENU_BUTTON_MODS").OnClick = () => + { + Menu = MenuType.None; Ui.OpenWindow("MODS_PANEL", new WidgetArgs() { - { "onExit", () => {} }, + { "onExit", () => Menu = MenuType.Main }, { "onSwitch", RemoveShellmapUI } }); + }; widget.Get("MAINMENU_BUTTON_REPLAY_VIEWER").OnClick = () => + { + Menu = MenuType.None; Ui.OpenWindow("REPLAYBROWSER_BG", new WidgetArgs() { - { "onExit", () => {} }, + { "onExit", () => Menu = MenuType.Main }, { "onStart", RemoveShellmapUI } }); + }; + widget.Get("MAINMENU_BUTTON_QUIT").OnClick = () => Game.Exit(); } @@ -51,18 +80,20 @@ namespace OpenRA.Mods.RA.Widgets.Logic void OpenGamePanel(string id) { + Menu = MenuType.None; Ui.OpenWindow(id, new WidgetArgs() { - { "onExit", () => {} }, + { "onExit", () => Menu = MenuType.Main }, { "openLobby", () => OpenLobbyPanel() } }); } void OpenLobbyPanel() { + Menu = MenuType.None; Game.OpenWindow("SERVER_LOBBY", new WidgetArgs() { - { "onExit", () => { Game.Disconnect(); } }, + { "onExit", () => { Game.Disconnect(); Menu = MenuType.Main; } }, { "onStart", RemoveShellmapUI }, { "addBots", false } }); diff --git a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs index 1cf3c614b6..1b7ab442b4 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs @@ -32,7 +32,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic () => Play( Game.Settings.Sound.Repeat ? CurrentSong : GetNextSong() )); } - public MusicPlayerLogic() + [ObjectCreator.UseCtor] + public MusicPlayerLogic(Action onExit) { bg = Ui.Root.Get("MUSIC_MENU"); CurrentSong = GetNextSong(); @@ -41,7 +42,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic bg.Get( "BUTTON_PLAY" ).IsVisible = () => !Sound.MusicPlaying; bg.Get("BUTTON_CLOSE").OnClick = - () => { Game.Settings.Save(); Ui.CloseWindow(); }; + () => { Game.Settings.Save(); Ui.CloseWindow(); onExit(); }; bg.Get("BUTTON_INSTALL").IsVisible = () => false; diff --git a/OpenRA.Mods.RA/Widgets/Logic/SettingsMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SettingsMenuLogic.cs index b995c229c6..bea9cf55dc 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/SettingsMenuLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/SettingsMenuLogic.cs @@ -21,7 +21,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic { Widget bg; - public SettingsMenuLogic() + [ObjectCreator.UseCtor] + public SettingsMenuLogic(Action onExit) { bg = Ui.Root.Get("SETTINGS_MENU"); var tabs = bg.Get("TAB_CONTAINER"); @@ -247,6 +248,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic int.TryParse(maxFrameRate.Text, out gs.MaxFramerate); Game.Settings.Save(); Ui.CloseWindow(); + onExit(); }; } diff --git a/OpenRA.Mods.Cnc/Widgets/LogicTickerWidget.cs b/OpenRA.Mods.RA/Widgets/LogicTickerWidget.cs similarity index 68% rename from OpenRA.Mods.Cnc/Widgets/LogicTickerWidget.cs rename to OpenRA.Mods.RA/Widgets/LogicTickerWidget.cs index 5aad99107f..1bc7637581 100644 --- a/OpenRA.Mods.Cnc/Widgets/LogicTickerWidget.cs +++ b/OpenRA.Mods.RA/Widgets/LogicTickerWidget.cs @@ -1,6 +1,6 @@ -#region Copyright & License Information +#region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * 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, @@ -11,11 +11,11 @@ using System; using OpenRA.Widgets; -namespace OpenRA.Mods.Cnc.Widgets +namespace OpenRA.Mods.RA.Widgets { public class LogicTickerWidget : Widget { - public Action OnTick = () => {}; + public Action OnTick = () => { }; public override void Tick() { OnTick(); } } -} \ No newline at end of file +} diff --git a/mods/d2k/chrome/ingame.yaml b/mods/d2k/chrome/ingame.yaml deleted file mode 100644 index 00f3ca76f1..0000000000 --- a/mods/d2k/chrome/ingame.yaml +++ /dev/null @@ -1,232 +0,0 @@ -Container@INGAME_ROOT: - Logic:IngameChromeLogic - Children: - WorldInteractionController@INTERACTION_CONTROLLER: - X:0 - Y:0 - Width:WINDOW_RIGHT - Height:WINDOW_BOTTOM - ViewportScrollController: - X:0 - Y:0 - Width:WINDOW_RIGHT - Height:WINDOW_BOTTOM - WorldCommand: - X:0 - Y:0 - Width:WINDOW_RIGHT - Height:WINDOW_BOTTOM - Timer@GAME_TIMER: - X: WINDOW_RIGHT/2 - Y: 0-10 - StrategicProgress@STRATEGIC_PROGRESS: - X: WINDOW_RIGHT/2 - Y: 40 - Background@POSTGAME_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:400 - Height:100 - Background:dialog4 - Visible:false - Children: - Label@TEXT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:0 - Width:200 - Height:80 - Align:Center - Button@POSTGAME_OBSERVE: - X:10 - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Observe - Button@POSTGAME_QUIT: - X:(PARENT_RIGHT - WIDTH - 10) - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Leave - SupportPowerBin@INGAME_POWERS_BIN: - X:0 - Y:25 - ReadyText: READY - HoldText: ON HOLD - BuildPalette@INGAME_BUILD_PALETTE: - X:WINDOW_RIGHT - 250 - Y:280 - Width:250 - Height:500 - ReadyText: READY - HoldText: ON HOLD - RequiresText: Requires - IconWidth: 60 - IconHeight: 47 - Button@INGAME_OPTIONS_BUTTON: - X:0 - Y:0 - Width:160 - Height:25 - Text:Options (ESC) - Font:Bold - Key: escape - Button@INGAME_DIPLOMACY_BUTTON: - X:162 - Y:0 - Width:160 - Height:25 - Text:Diplomacy (F1) - Font:Bold - Key: f1 - Button@CHEATS_BUTTON: - X:324 - Y:0 - Width:160 - Height:25 - Text:Cheats (F2) - Visible:false - Font:Bold - Key: f2 - Button@OBJECTIVES_BUTTON: - X:486 - Y:0 - Width:160 - Height:25 - Text:Objectives (F3) - Visible:false - Font:Bold - Key: f3 - RadarBin@INGAME_RADAR_BIN: - WorldInteractionController:INTERACTION_CONTROLLER - PowerBin@INGAME_POWER_BIN: - MoneyBin@INGAME_MONEY_BIN: - X:WINDOW_RIGHT - WIDTH - Y:0 - Width:320 - Height: 32 - Children: - OrderButton@SELL: - Logic:OrderButtonsChromeLogic - X:3 - Y:0 - Width:30 - Height:30 - Image:sell - Description:Sell - LongDesc:Sell buildings, reclaiming a \nproportion of their build cost - OrderButton@POWER_DOWN: - Logic:OrderButtonsChromeLogic - X:39 - Y:0 - Width:30 - Height:30 - Image:power - Description:Powerdown - LongDesc:Disable unneeded structures so their \npower can be used elsewhere - OrderButton@REPAIR: - Logic:OrderButtonsChromeLogic - X:75 - Y:0 - Width:30 - Height:30 - Image:repair - Description:Repair - LongDesc:Repair damaged buildings - WorldTooltip: - Background@INGAME_OPTIONS_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:300 - Height:295 - Visible:false - Children: - Label@LABEL_TITLE: - X:(PARENT_RIGHT - WIDTH)/2 - Y:20 - Width:250 - Height:25 - Text:Options - Align:Center - Font:Bold - Button@RESUME: - X:(PARENT_RIGHT - WIDTH)/2 - Y:60 - Width:160 - Height:25 - Text:Resume - Font:Bold - Key:escape - Button@SETTINGS: - X:(PARENT_RIGHT - WIDTH)/2 - Y:100 - Width:160 - Height:25 - Text:Settings - Font:Bold - Button@MUSIC: - X:(PARENT_RIGHT - WIDTH)/2 - Y:140 - Width:160 - Height:25 - Text:Music - Font:Bold - Button@SURRENDER: - X:(PARENT_RIGHT - WIDTH)/2 - Y:180 - Width:160 - Height:25 - Text:Surrender - Font:Bold - Button@DISCONNECT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:220 - Width:160 - Height:25 - Text:Abort Mission - Font:Bold - Background@DIPLOMACY_BG: - Logic:DiplomacyLogic - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:450 - Height:400 - Visible:false - Children: - Label@LABEL_TITLE: - X:(PARENT_RIGHT - WIDTH)/2 - Y:20 - Width:250 - Height:25 - Text:Diplomacy - Align:Center - Font:Bold - Button@CLOSE_DIPLOMACY: - X:(PARENT_RIGHT - WIDTH)/2 - Y:350 - Width:160 - Height:25 - Text:Close - Font:Bold - Key:escape - 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 - Width:200 - Height:200 - Label@TEXT: - X:20 - Y:205 - Width:170 - Height:40 \ No newline at end of file diff --git a/mods/d2k/chrome/mainmenu.yaml b/mods/d2k/chrome/mainmenu.yaml index a0ba0d41e1..2e762ef458 100644 --- a/mods/d2k/chrome/mainmenu.yaml +++ b/mods/d2k/chrome/mainmenu.yaml @@ -1,4 +1,4 @@ -Background@MAINMENU_BG: +Background@MAINMENU: X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 Width:250 @@ -88,146 +88,4 @@ Background@PERF_BG: X:20 Y:205 Width:170 - Height:40 -Background@MUSIC_MENU: - Logic:MusicPlayerLogic - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width: 450 - Height: 250 - Visible: true - Children: - Label@SETTINGS_LABEL_TITLE: - X:0 - Y:20 - Width:450 - Height:25 - Text:Music - Align:Center - Font:Bold - Button@BUTTON_INSTALL: - X:20 - Y:PARENT_BOTTOM - 45 - Width:160 - Height:25 - Text:Install Music - Font:Bold - Button@BUTTON_CLOSE: - X:PARENT_RIGHT - 180 - Y:PARENT_BOTTOM - 45 - Width:160 - Height:25 - Text:Close - Font:Bold - Key:escape - Container@BUTTONS: - X:PARENT_RIGHT - 150 - Y:50 - Children: - Button@BUTTON_PLAY: - X:35 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PLAY: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:play - Button@BUTTON_PAUSE: - Visible:false - X:35 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PAUSE: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:pause - Button@BUTTON_STOP: - X:70 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_STOP: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:stop - Button@BUTTON_NEXT: - X:105 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_NEXT: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:next - Button@BUTTON_PREV: - X:0 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PREV: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:prev - Label@TIME: - X:PARENT_RIGHT - 150 - Y:75 - Width:140 - Height:25 - Align: Center - ScrollPanel@MUSIC_LIST: - X:10 - Y:50 - Width:280 - Height:140 - Children: - ScrollItem@MUSIC_TEMPLATE: - Width:PARENT_RIGHT-27 - Height:25 - X:2 - Y:0 - Visible:false - Children: - Label@TITLE: - X:5 - Width:PARENT_RIGHT - 10 - Height:PARENT_BOTTOM - Align: Left - Label@LENGTH: - X:5 - Width:PARENT_RIGHT - 10 - Height:PARENT_BOTTOM - Align: Right - Checkbox@SHUFFLE: - X:PARENT_RIGHT - 150 - Y:110 - Width:100 - Height:20 - Text:Shuffle - Checkbox@REPEAT: - X:PARENT_RIGHT - 150 - Y:140 - Width:100 - Height:20 - Text:Loop + Height:40 \ No newline at end of file diff --git a/mods/d2k/maps/Brimstone.oramap b/mods/d2k/maps/Brimstone.oramap index 5a8833a156..d622b78617 100644 Binary files a/mods/d2k/maps/Brimstone.oramap and b/mods/d2k/maps/Brimstone.oramap differ diff --git a/mods/d2k/maps/DeathDepths.oramap b/mods/d2k/maps/DeathDepths.oramap index a15476ada4..b4be2fcd41 100644 Binary files a/mods/d2k/maps/DeathDepths.oramap and b/mods/d2k/maps/DeathDepths.oramap differ diff --git a/mods/d2k/maps/DeathDepths2.oramap b/mods/d2k/maps/DeathDepths2.oramap index c4d380d2c6..cd38475361 100644 Binary files a/mods/d2k/maps/DeathDepths2.oramap and b/mods/d2k/maps/DeathDepths2.oramap differ diff --git a/mods/d2k/maps/dune_boogie.oramap b/mods/d2k/maps/dune_boogie.oramap index a7644493e4..145be8caf1 100644 Binary files a/mods/d2k/maps/dune_boogie.oramap and b/mods/d2k/maps/dune_boogie.oramap differ diff --git a/mods/d2k/maps/shellmap/map.bin b/mods/d2k/maps/shellmap/map.bin new file mode 100644 index 0000000000..14177c35fe Binary files /dev/null and b/mods/d2k/maps/shellmap/map.bin differ diff --git a/mods/d2k/maps/shellmap/map.yaml b/mods/d2k/maps/shellmap/map.yaml new file mode 100644 index 0000000000..9b01b84970 --- /dev/null +++ b/mods/d2k/maps/shellmap/map.yaml @@ -0,0 +1,100 @@ +Selectable: False + +MapFormat: 5 + +Title: Shellmap + +Description: Shellmap + +Author: Westwood Studios + +Tileset: ARRAKIS + +MapSize: 128,128 + +Bounds: 16,16,80,80 + +UseAsShellmap: True + +Type: Conquest + +Players: + PlayerReference@Neutral: + Name: Neutral + OwnsWorld: True + Race: allies +Actors: + Actor0: spicebloom + Location: 27,42 + Owner: Neutral + Actor3: spicebloom + Location: 43,22 + Owner: Neutral + Actor4: spicebloom + Location: 50,53 + Owner: Neutral + Actor5: spicebloom + Location: 50,65 + Owner: Neutral + Actor6: spicebloom + Location: 45,75 + Owner: Neutral + Actor7: spicebloom + Location: 64,52 + Owner: Neutral + Actor8: spicebloom + Location: 65,64 + Owner: Neutral + Actor9: spicebloom + Location: 65,20 + Owner: Neutral + Actor12: spicebloom + Location: 85,42 + Owner: Neutral + Actor13: spicebloom + Location: 40,45 + Owner: Neutral + Actor14: spicebloom + Location: 52,37 + Owner: Neutral + Actor15: spicebloom + Location: 67,34 + Owner: Neutral + Actor16: spicebloom + Location: 76,43 + Owner: Neutral + Actor17: spicebloom + Location: 26,75 + Owner: Neutral + Actor18: spicebloom + Location: 48,91 + Owner: Neutral + Actor19: spicebloom + Location: 29,61 + Owner: Neutral + Actor22: spicebloom + Location: 93,68 + Owner: Neutral + Actor23: spicebloom + Location: 71,74 + Owner: Neutral + Actor24: spicebloom + Location: 62,92 + Owner: Neutral + Actor25: spicebloom + Location: 82,65 + Owner: Neutral + +Smudges: + +Rules: + World: + LoadWidgetAtGameStart: + Widget: MAINMENU +Sequences: + +Weapons: + +Voices: + +Notifications: diff --git a/mods/d2k/maps/the-duell.oramap b/mods/d2k/maps/the-duell.oramap index 335addfc88..1b463e17a5 100644 Binary files a/mods/d2k/maps/the-duell.oramap and b/mods/d2k/maps/the-duell.oramap differ diff --git a/mods/d2k/maps/tucks-sietch.oramap b/mods/d2k/maps/tucks-sietch.oramap index a6ab54d2c0..aeb8b1d827 100644 Binary files a/mods/d2k/maps/tucks-sietch.oramap and b/mods/d2k/maps/tucks-sietch.oramap differ diff --git a/mods/d2k/maps/venac-ditch.oramap b/mods/d2k/maps/venac-ditch.oramap index b8bd7a7435..f9b91fde97 100644 Binary files a/mods/d2k/maps/venac-ditch.oramap and b/mods/d2k/maps/venac-ditch.oramap differ diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 0999f09c7c..dbd26c8d27 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -45,10 +45,11 @@ Assemblies: ChromeLayout: mods/d2k/chrome/gameinit.yaml - mods/d2k/chrome/ingame.yaml + mods/ra/chrome/ingame.yaml mods/ra/chrome/ingame-chat.yaml - mods/ra/chrome/ingame-observer.yaml mods/ra/chrome/ingame-fmvplayer.yaml + mods/ra/chrome/ingame-menu.yaml + mods/ra/chrome/ingame-observerstats.yaml mods/d2k/chrome/mainmenu.yaml mods/ra/chrome/settings.yaml mods/d2k/chrome/lobby.yaml @@ -60,8 +61,8 @@ ChromeLayout: mods/ra/chrome/dropdowns.yaml mods/ra/chrome/modchooser.yaml mods/ra/chrome/cheats.yaml + mods/ra/chrome/musicplayer.yaml mods/d2k/chrome/tooltips.yaml - Weapons: mods/d2k/weapons/defaults.yaml mods/d2k/weapons/explosions.yaml diff --git a/mods/d2k/rules/system.yaml b/mods/d2k/rules/system.yaml index 95aea4af8d..f796511edb 100644 --- a/mods/d2k/rules/system.yaml +++ b/mods/d2k/rules/system.yaml @@ -273,9 +273,8 @@ Player: HarvesterAttackNotifier: World: - OpenWidgetAtGameStart: + LoadWidgetAtGameStart: Widget: INGAME_ROOT - ObserverWidget: OBSERVER_ROOT ScreenShaker: NukePaletteEffect: BuildingInfluence: diff --git a/mods/ra/chrome/cheats.yaml b/mods/ra/chrome/cheats.yaml index 94645092e5..b07fee7405 100644 --- a/mods/ra/chrome/cheats.yaml +++ b/mods/ra/chrome/cheats.yaml @@ -4,7 +4,7 @@ Background@CHEATS_PANEL: Y:(WINDOW_BOTTOM - HEIGHT)/2 Width:350 Height:475 - Visible:true + Visible:false Children: Label@LABEL_TITLE: X:(PARENT_RIGHT - WIDTH)/2 diff --git a/mods/ra/chrome/ingame-menu.yaml b/mods/ra/chrome/ingame-menu.yaml new file mode 100644 index 0000000000..8fbc83143e --- /dev/null +++ b/mods/ra/chrome/ingame-menu.yaml @@ -0,0 +1,52 @@ +Background@INGAME_OPTIONS_BG: + X:(WINDOW_RIGHT - WIDTH)/2 + Y:(WINDOW_BOTTOM - HEIGHT)/2 + Width:300 + Height:295 + Logic:IngameMenuLogic + Visible:false + Children: + Label@LABEL_TITLE: + X:(PARENT_RIGHT - WIDTH)/2 + Y:20 + Width:250 + Height:25 + Text:Options + Align:Center + Font:Bold + Button@RESUME: + X:(PARENT_RIGHT - WIDTH)/2 + Y:60 + Width:160 + Height:25 + Text:Resume + Font:Bold + Key:escape + Button@SETTINGS: + X:(PARENT_RIGHT - WIDTH)/2 + Y:100 + Width:160 + Height:25 + Text:Settings + Font:Bold + Button@MUSIC: + X:(PARENT_RIGHT - WIDTH)/2 + Y:140 + Width:160 + Height:25 + Text:Music + Font:Bold + Button@SURRENDER: + X:(PARENT_RIGHT - WIDTH)/2 + Y:180 + Width:160 + Height:25 + Text:Surrender + Font:Bold + Button@DISCONNECT: + X:(PARENT_RIGHT - WIDTH)/2 + Y:220 + Width:160 + Height:25 + Text:Abort Mission + Font:Bold \ No newline at end of file diff --git a/mods/ra/chrome/ingame-objectives.yaml b/mods/ra/chrome/ingame-objectives.yaml new file mode 100644 index 0000000000..a4628eaa2d --- /dev/null +++ b/mods/ra/chrome/ingame-objectives.yaml @@ -0,0 +1,99 @@ +Background@MISSION_OBJECTIVES: + Logic:MissionObjectivesLogic + X:25 + Y:50 + Width:512 + Height:530 + Visible:false + Background:dialog + Children: + Label@TITLE: + X:0 + Y:15 + Width:PARENT_RIGHT + Height:25 + Font:Bold + Align:Center + Text:Objectives + Label@PRIMARY_OBJECTIVE_HEADER: + X:40 + Y:40 + Width:300 + Height:25 + Font:Bold + Text:Primary Objectives + Label@PRIMARY_STATUS_HEADER: + X:350 + Y:40 + Width:122 + Height:25 + Font:Bold + Text:Status + ScrollPanel@PRIMARY_OBJECTIVES: + X:25 + Y:70 + Width:PARENT_RIGHT-50 + Height:200 + ItemSpacing:5 + Children: + Container@PRIMARY_OBJECTIVE_TEMPLATE: + X:15 + Y:0-15 + Width:PARENT_RIGHT + Height:60 + Children: + Label@PRIMARY_OBJECTIVE: + X:0 + Y:0 + Width:300 + Height:PARENT_BOTTOM + Font:Regular + WordWrap:True + Label@PRIMARY_STATUS: + X:310 + Y:0 + Width:122 + Height:PARENT_BOTTOM + Font:Bold + WordWrap:True + Label@SECONDARY_OBJECTIVE_HEADER: + X:40 + Y:275 + Width:300 + Height:25 + Font:Bold + Text:Secondary Objectives + Label@SECONDARY_STATUS_HEADER: + X:350 + Y:275 + Width:122 + Height:25 + Font:Bold + Text:Status + ScrollPanel@SECONDARY_OBJECTIVES: + X:25 + Y:305 + Width:PARENT_RIGHT-50 + Height:200 + ItemSpacing:5 + Children: + Container@SECONDARY_OBJECTIVE_TEMPLATE: + X:15 + Y:0-15 + Width:PARENT_RIGHT + Height:60 + Children: + Label@SECONDARY_OBJECTIVE: + X:0 + Y:0 + Width:300 + Height:PARENT_BOTTOM + Font:Regular + WordWrap:True + Label@SECONDARY_STATUS: + X:310 + Y:0 + Width:122 + Height:PARENT_BOTTOM + Font:Bold + WordWrap:True \ No newline at end of file diff --git a/mods/ra/chrome/ingame-observer.yaml b/mods/ra/chrome/ingame-observer.yaml deleted file mode 100644 index e757831a99..0000000000 --- a/mods/ra/chrome/ingame-observer.yaml +++ /dev/null @@ -1,643 +0,0 @@ -Container@OBSERVER_ROOT: - Visible:true - Logic:IngameObserverChromeLogic - Children: - WorldInteractionController@INTERACTION_CONTROLLER: - X:0 - Y:0 - Width:WINDOW_RIGHT - Height:WINDOW_BOTTOM - ViewportScrollController: - X:0 - Y:0 - Width:WINDOW_RIGHT - Height:WINDOW_BOTTOM - Timer@GAME_TIMER: - X: WINDOW_RIGHT/2 - Y: 0-10 - Background@POSTGAME_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:400 - Height:100 - Background:dialog4 - Visible:false - Children: - Label@TEXT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:0 - Width:200 - Height:80 - Align:Center - Button@POSTGAME_OBSERVE: - X:10 - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Observe - Button@POSTGAME_QUIT: - X:(PARENT_RIGHT - WIDTH - 10) - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Leave - SupportPowerBin@INGAME_POWERS_BIN: - X:0 - Y:25 - Button@INGAME_OPTIONS_BUTTON: - X:0 - Y:0 - Width:160 - Height:25 - Text:Options (ESC) - Font:Bold - Key:escape - Button@INGAME_STATS_BUTTON: - X:162 - Y:0 - Width:160 - Height:25 - Text:Statistics (F1) - Font:Bold - Key:f1 - Background@RADAR_BG: - X:WINDOW_RIGHT-255 - Y:5 - Width:250 - Height:250 - Children: - Radar@INGAME_RADAR: - X:10 - Y:10 - Width:PARENT_RIGHT-19 - Height:PARENT_BOTTOM-19 - WorldInteractionController:INTERACTION_CONTROLLER - DropDownButton@SHROUD_SELECTOR: - Logic:ObserverShroudSelectorLogic - X:WINDOW_RIGHT-250 - Y:260 - Width:240 - Height:25 - Font:Bold - Visible:true - WorldTooltip: - Background@INGAME_OPTIONS_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:300 - Height:295 - Visible:false - Children: - Label@LABEL_TITLE: - X:(PARENT_RIGHT - WIDTH)/2 - Y:20 - Width:250 - Height:25 - Text:Options - Align:Center - Font:Bold - Button@RESUME: - X:(PARENT_RIGHT - WIDTH)/2 - Y:60 - Width:160 - Height:25 - Text:Resume - Font:Bold - Key:escape - Button@SETTINGS: - X:(PARENT_RIGHT - WIDTH)/2 - Y:100 - Width:160 - Height:25 - Text:Settings - Font:Bold - Button@MUSIC: - X:(PARENT_RIGHT - WIDTH)/2 - Y:140 - Width:160 - Height:25 - Text:Music - Font:Bold - Button@SURRENDER: - X:(PARENT_RIGHT - WIDTH)/2 - Y:180 - Width:160 - Height:25 - Text:Surrender - Font:Bold - Button@DISCONNECT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:220 - Width:160 - Height:25 - Text:Abort Mission - 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 - Width:200 - Height:200 - Label@TEXT: - X:20 - Y:205 - Width:170 - Height:40 - Container@OBSERVER_STATS: - Logic:ObserverStatsLogic - X:25 - Y:50 - Width:950 - Height:500 - Visible:false - Children: - Background@BACKGROUND: - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Background:dialog - Children: - Label@TITLE: - X:0 - Y:15 - Width:PARENT_RIGHT - Height:25 - Font:Bold - Align:Center - Text:Statistics - DropDownButton@STATS_DROPDOWN: - X:PARENT_RIGHT-200 - Y:15 - Width:185 - Height:25 - Font:Bold - Container@BASIC_STATS_HEADERS: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Children: - Label@PLAYER_HEADER: - X:85 - Y:40 - Width:160 - Height:25 - Font:Bold - Text:Player - Label@CASH_HEADER: - X:245 - Y:40 - Width:80 - Height:25 - Font:Bold - Text:Cash - Label@EARNED_MIN_HEADER: - X:325 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Earned/min - Label@POWER_HEADER: - X:425 - Y:40 - Width:80 - Height:25 - Font:Bold - Text:Power - Label@KILLS_HEADER: - X:505 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Kills - Align:Right - Label@DEATHS_HEADER: - X:565 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Deaths - Align:Right - Label@ACTIONS_MIN_HEADER: - X:665 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Actions/min - Align:Right - Container@ECONOMY_STATS_HEADERS: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Children: - Label@PLAYER_HEADER: - X:85 - Y:40 - Width:160 - Height:25 - Font:Bold - Text:Player - Label@CASH_HEADER: - X:245 - Y:40 - Width:80 - Height:25 - Font:Bold - Text:Cash - Label@EARNED_MIN_HEADER: - X:325 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Earned/min - Label@EARNED_THIS_MIN_HEADER: - X:425 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Earned this min - Label@ASSETS_HEADER: - X:565 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Assets - Label@EARNED_HEADER: - X:645 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Earned - Label@SPENT_HEADER: - X:725 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Spent - Label@HARVESTERS_HEADER: - X:805 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Harvesters - Align:Right - Container@PRODUCTION_STATS_HEADERS: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Children: - Label@PLAYER_HEADER: - X:85 - Y:40 - Width:160 - Height:25 - Font:Bold - Text:Player - Label@PRODUCTION_HEADER: - X:245 - Y:40 - Width:320 - Height:25 - Font:Bold - Text:Production - Label@SUPPORT_POWERS_HEADER: - X:565 - Y:40 - Width:320 - Height:25 - Font:Bold - Text:Support Powers - Container@COMBAT_STATS_HEADERS: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Children: - Label@PLAYER_HEADER: - X:85 - Y:40 - Width:160 - Height:25 - Font:Bold - Text:Player - Label@CONTROL_HEADER: - X:245 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Control - Label@KILLS_COST_HEADER: - X:325 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Kills - Label@DEATHS_COST_HEADER: - X:405 - Y:40 - Width:60 - Height:25 - Font:Bold - Text:Deaths - Label@UNITS_KILLED_HEADER: - X:505 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Units Killed - Align:Right - Label@UNITS_DEAD_HEADER: - X:605 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Units Lost - Align:Right - Label@BUILDINGS_KILLED_HEADER: - X:725 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Bldg Killed - Align:Right - Label@BUILDINGS_DEAD_HEADER: - X:825 - Y:40 - Width:40 - Height:25 - Font:Bold - Text:Bldg Lost - Align:Right - Container@EARNED_THIS_MIN_GRAPH_HEADERS: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Children: - Label@EARNED_THIS_MIN_HEADER: - X:0 - Y:40 - Width:PARENT_RIGHT - Height:25 - Font:Bold - Text:Earnings received each minute - Align:Center - ScrollPanel@PLAYER_STATS_PANEL: - X:25 - Y:70 - Width:PARENT_RIGHT-50 - Height:PARENT_BOTTOM-45-50 - ItemSpacing:5 - Children: - ScrollItem@TEAM_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-35 - Height:25 - Children: - Label@TEAM: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Font:Bold - ScrollItem@BASIC_PLAYER_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-35 - Height:25 - Children: - Image@FLAG: - X:20 - Y:5 - Width:35 - Height:PARENT_BOTTOM-5 - ImageName:random - ImageCollection:flags - Label@PLAYER: - X:55 - Y:0 - Width:160 - Height:PARENT_BOTTOM - Font:Bold - Label@CASH: - X:215 - Y:0 - Width:80 - Height:PARENT_BOTTOM - Label@EARNED_MIN: - X:295 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@POWER: - X:395 - Y:0 - Width:80 - Height:PARENT_BOTTOM - Label@KILLS: - X:475 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Label@DEATHS: - X:535 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Label@ACTIONS_MIN: - X:635 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - ScrollItem@ECONOMY_PLAYER_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-35 - Height:25 - Children: - Image@FLAG: - X:20 - Y:5 - Width:35 - Height:PARENT_BOTTOM-5 - ImageName:random - ImageCollection:flags - Label@PLAYER: - X:55 - Y:0 - Width:160 - Height:PARENT_BOTTOM - Font:Bold - Label@CASH: - X:215 - Y:0 - Width:80 - Height:PARENT_BOTTOM - Label@EARNED_MIN: - X:295 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@EARNED_THIS_MIN: - X:395 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@ASSETS: - X:535 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@EARNED: - X:615 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@SPENT: - X:695 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@HARVESTERS: - X:775 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Align:Right - ScrollItem@PRODUCTION_PLAYER_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-35 - Height:25 - Children: - Image@FLAG: - X:20 - Y:5 - Width:35 - Height:PARENT_BOTTOM-5 - ImageName:random - ImageCollection:flags - Label@PLAYER: - X:55 - Y:0 - Width:160 - Height:PARENT_BOTTOM - Font:Bold - ObserverProductionIcons@PRODUCTION_ICONS: - X:215 - Y:0 - Width:320 - Height:PARENT_BOTTOM - ObserverSupportPowerIcons@SUPPORT_POWER_ICONS: - X:535 - Y:0 - Width:320 - Height:PARENT_BOTTOM - ScrollItem@COMBAT_PLAYER_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-35 - Height:25 - Children: - Image@FLAG: - X:20 - Y:5 - Width:35 - Height:PARENT_BOTTOM-5 - ImageName:random - ImageCollection:flags - Label@PLAYER: - X:55 - Y:0 - Width:160 - Height:PARENT_BOTTOM - Font:Bold - Label@CONTROL: - X:215 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@KILLS_COST: - X:295 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@DEATHS_COST: - X:375 - Y:0 - Width:60 - Height:PARENT_BOTTOM - Label@UNITS_KILLED: - X:475 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Label@UNITS_DEAD: - X:575 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Label@BUILDINGS_KILLED: - X:695 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Label@BUILDINGS_DEAD: - X:795 - Y:0 - Width:40 - Height:PARENT_BOTTOM - Align:Right - Container@EARNED_THIS_MIN_GRAPH_TEMPLATE: - X:0 - Y:0 - Width:PARENT_RIGHT-100 - Height:PARENT_BOTTOM-50 - Children: - LineGraph@EARNED_THIS_MIN_GRAPH: - X:0 - Y:0 - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - ValueFormat:${0} - XAxisValueFormat:{0} - YAxisValueFormat:${0:F0} - XAxisSize:20 - YAxisSize:10 - XAxisLabel:m - YAxisLabel:$ - LabelFont:TinyBold - AxisFont:Bold \ No newline at end of file diff --git a/mods/ra/chrome/ingame-observerstats.yaml b/mods/ra/chrome/ingame-observerstats.yaml new file mode 100644 index 0000000000..d9659ea0a2 --- /dev/null +++ b/mods/ra/chrome/ingame-observerstats.yaml @@ -0,0 +1,488 @@ +Container@OBSERVER_STATS: + Logic:ObserverStatsLogic + X:25 + Y:50 + Width:950 + Height:500 + Visible:false + Children: + Background@BACKGROUND: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Background:dialog + Children: + Label@TITLE: + X:0 + Y:15 + Width:PARENT_RIGHT + Height:25 + Font:Bold + Align:Center + Text:Statistics + DropDownButton@STATS_DROPDOWN: + X:PARENT_RIGHT-200 + Y:15 + Width:185 + Height:25 + Font:Bold + Container@BASIC_STATS_HEADERS: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@PLAYER_HEADER: + X:85 + Y:40 + Width:160 + Height:25 + Font:Bold + Text:Player + Label@CASH_HEADER: + X:245 + Y:40 + Width:80 + Height:25 + Font:Bold + Text:Cash + Label@EARNED_MIN_HEADER: + X:325 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Earned/min + Label@POWER_HEADER: + X:425 + Y:40 + Width:80 + Height:25 + Font:Bold + Text:Power + Label@KILLS_HEADER: + X:505 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Kills + Align:Right + Label@DEATHS_HEADER: + X:565 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Deaths + Align:Right + Label@ACTIONS_MIN_HEADER: + X:665 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Actions/min + Align:Right + Container@ECONOMY_STATS_HEADERS: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@PLAYER_HEADER: + X:85 + Y:40 + Width:160 + Height:25 + Font:Bold + Text:Player + Label@CASH_HEADER: + X:245 + Y:40 + Width:80 + Height:25 + Font:Bold + Text:Cash + Label@EARNED_MIN_HEADER: + X:325 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Earned/min + Label@EARNED_THIS_MIN_HEADER: + X:425 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Earned this min + Label@ASSETS_HEADER: + X:565 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Assets + Label@EARNED_HEADER: + X:645 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Earned + Label@SPENT_HEADER: + X:725 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Spent + Label@HARVESTERS_HEADER: + X:805 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Harvesters + Align:Right + Container@PRODUCTION_STATS_HEADERS: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@PLAYER_HEADER: + X:85 + Y:40 + Width:160 + Height:25 + Font:Bold + Text:Player + Label@PRODUCTION_HEADER: + X:245 + Y:40 + Width:320 + Height:25 + Font:Bold + Text:Production + Label@SUPPORT_POWERS_HEADER: + X:565 + Y:40 + Width:320 + Height:25 + Font:Bold + Text:Support Powers + Container@COMBAT_STATS_HEADERS: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@PLAYER_HEADER: + X:85 + Y:40 + Width:160 + Height:25 + Font:Bold + Text:Player + Label@CONTROL_HEADER: + X:245 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Control + Label@KILLS_COST_HEADER: + X:325 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Kills + Label@DEATHS_COST_HEADER: + X:405 + Y:40 + Width:60 + Height:25 + Font:Bold + Text:Deaths + Label@UNITS_KILLED_HEADER: + X:505 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Units Killed + Align:Right + Label@UNITS_DEAD_HEADER: + X:605 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Units Lost + Align:Right + Label@BUILDINGS_KILLED_HEADER: + X:725 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Bldg Killed + Align:Right + Label@BUILDINGS_DEAD_HEADER: + X:825 + Y:40 + Width:40 + Height:25 + Font:Bold + Text:Bldg Lost + Align:Right + Container@EARNED_THIS_MIN_GRAPH_HEADERS: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@EARNED_THIS_MIN_HEADER: + X:0 + Y:40 + Width:PARENT_RIGHT + Height:25 + Font:Bold + Text:Earnings received each minute + Align:Center + ScrollPanel@PLAYER_STATS_PANEL: + X:25 + Y:70 + Width:PARENT_RIGHT-50 + Height:PARENT_BOTTOM-45-50 + ItemSpacing:5 + Children: + ScrollItem@TEAM_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-35 + Height:25 + Children: + Label@TEAM: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Font:Bold + ScrollItem@BASIC_PLAYER_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-35 + Height:25 + Children: + Image@FLAG: + X:20 + Y:5 + Width:35 + Height:PARENT_BOTTOM-5 + ImageName:random + ImageCollection:flags + Label@PLAYER: + X:55 + Y:0 + Width:160 + Height:PARENT_BOTTOM + Font:Bold + Label@CASH: + X:215 + Y:0 + Width:80 + Height:PARENT_BOTTOM + Label@EARNED_MIN: + X:295 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@POWER: + X:395 + Y:0 + Width:80 + Height:PARENT_BOTTOM + Label@KILLS: + X:475 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Label@DEATHS: + X:535 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Label@ACTIONS_MIN: + X:635 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + ScrollItem@ECONOMY_PLAYER_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-35 + Height:25 + Children: + Image@FLAG: + X:20 + Y:5 + Width:35 + Height:PARENT_BOTTOM-5 + ImageName:random + ImageCollection:flags + Label@PLAYER: + X:55 + Y:0 + Width:160 + Height:PARENT_BOTTOM + Font:Bold + Label@CASH: + X:215 + Y:0 + Width:80 + Height:PARENT_BOTTOM + Label@EARNED_MIN: + X:295 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@EARNED_THIS_MIN: + X:395 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@ASSETS: + X:535 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@EARNED: + X:615 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@SPENT: + X:695 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@HARVESTERS: + X:775 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Align:Right + ScrollItem@PRODUCTION_PLAYER_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-35 + Height:25 + Children: + Image@FLAG: + X:20 + Y:5 + Width:35 + Height:PARENT_BOTTOM-5 + ImageName:random + ImageCollection:flags + Label@PLAYER: + X:55 + Y:0 + Width:160 + Height:PARENT_BOTTOM + Font:Bold + ObserverProductionIcons@PRODUCTION_ICONS: + X:215 + Y:0 + Width:320 + Height:PARENT_BOTTOM + ObserverSupportPowerIcons@SUPPORT_POWER_ICONS: + X:535 + Y:0 + Width:320 + Height:PARENT_BOTTOM + ScrollItem@COMBAT_PLAYER_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-35 + Height:25 + Children: + Image@FLAG: + X:20 + Y:5 + Width:35 + Height:PARENT_BOTTOM-5 + ImageName:random + ImageCollection:flags + Label@PLAYER: + X:55 + Y:0 + Width:160 + Height:PARENT_BOTTOM + Font:Bold + Label@CONTROL: + X:215 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@KILLS_COST: + X:295 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@DEATHS_COST: + X:375 + Y:0 + Width:60 + Height:PARENT_BOTTOM + Label@UNITS_KILLED: + X:475 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Label@UNITS_DEAD: + X:575 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Label@BUILDINGS_KILLED: + X:695 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Label@BUILDINGS_DEAD: + X:795 + Y:0 + Width:40 + Height:PARENT_BOTTOM + Align:Right + Container@EARNED_THIS_MIN_GRAPH_TEMPLATE: + X:0 + Y:0 + Width:PARENT_RIGHT-100 + Height:PARENT_BOTTOM-50 + Children: + LineGraph@EARNED_THIS_MIN_GRAPH: + X:0 + Y:0 + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + ValueFormat:${0} + XAxisValueFormat:{0} + YAxisValueFormat:${0:F0} + XAxisSize:20 + YAxisSize:10 + XAxisLabel:m + YAxisLabel:$ + LabelFont:TinyBold + AxisFont:Bold \ No newline at end of file diff --git a/mods/ra/chrome/ingame.yaml b/mods/ra/chrome/ingame.yaml index da33fa2c65..6b1de7e90e 100644 --- a/mods/ra/chrome/ingame.yaml +++ b/mods/ra/chrome/ingame.yaml @@ -22,47 +22,7 @@ Container@INGAME_ROOT: StrategicProgress@STRATEGIC_PROGRESS: X: WINDOW_RIGHT/2 Y: 40 - Background@POSTGAME_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:400 - Height:100 - Background:dialog4 - Visible:false - Children: - Label@TEXT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:0 - Width:200 - Height:80 - Align:Center - Button@POSTGAME_OBSERVE: - X:10 - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Observe - Button@POSTGAME_QUIT: - X:(PARENT_RIGHT - WIDTH - 10) - Y:(PARENT_BOTTOM - HEIGHT - 10) - Width:150 - Height:25 - Font:Bold - Text:Leave - SupportPowerBin@INGAME_POWERS_BIN: - X:0 - Y:25 - ReadyText: READY - HoldText: ON HOLD - BuildPalette@INGAME_BUILD_PALETTE: - X:WINDOW_RIGHT - 250 - Y:280 - Width:250 - Height:500 - ReadyText: READY - HoldText: ON HOLD - RequiresText: Requires + Container@PLAYER_ROOT: Button@INGAME_OPTIONS_BUTTON: X:0 Y:0 @@ -71,6 +31,30 @@ Container@INGAME_ROOT: Text:Options (ESC) Font:Bold Key: escape + WorldTooltip: + 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 + Width:200 + Height:200 + Label@TEXT: + X:20 + Y:205 + Width:170 + Height:40 + +Container@PLAYER_WIDGETS: + Children: + LogicTicker@WIN_LOSS_WATCHER: Button@INGAME_DIPLOMACY_BUTTON: X:162 Y:0 @@ -133,58 +117,19 @@ Container@INGAME_ROOT: Image:repair Description:Repair LongDesc:Repair damaged buildings - WorldTooltip: - Background@INGAME_OPTIONS_BG: - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:300 - Height:295 - Visible:false - Children: - Label@LABEL_TITLE: - X:(PARENT_RIGHT - WIDTH)/2 - Y:20 - Width:250 - Height:25 - Text:Options - Align:Center - Font:Bold - Button@RESUME: - X:(PARENT_RIGHT - WIDTH)/2 - Y:60 - Width:160 - Height:25 - Text:Resume - Font:Bold - Key:escape - Button@SETTINGS: - X:(PARENT_RIGHT - WIDTH)/2 - Y:100 - Width:160 - Height:25 - Text:Settings - Font:Bold - Button@MUSIC: - X:(PARENT_RIGHT - WIDTH)/2 - Y:140 - Width:160 - Height:25 - Text:Music - Font:Bold - Button@SURRENDER: - X:(PARENT_RIGHT - WIDTH)/2 - Y:180 - Width:160 - Height:25 - Text:Surrender - Font:Bold - Button@DISCONNECT: - X:(PARENT_RIGHT - WIDTH)/2 - Y:220 - Width:160 - Height:25 - Text:Abort Mission - Font:Bold + SupportPowerBin@INGAME_POWERS_BIN: + X:0 + Y:25 + ReadyText: READY + HoldText: ON HOLD + BuildPalette@INGAME_BUILD_PALETTE: + X:WINDOW_RIGHT - 250 + Y:280 + Width:250 + Height:500 + ReadyText: READY + HoldText: ON HOLD + RequiresText: Requires Background@DIPLOMACY_BG: Logic:DiplomacyLogic X:(WINDOW_RIGHT - WIDTH)/2 @@ -209,22 +154,36 @@ Container@INGAME_ROOT: Text:Close Font:Bold Key:escape - Background@PERF_BG: - ClickThrough:true - Background:dialog4 - Logic:PerfDebugLogic - X:10 - Y:WINDOW_BOTTOM - 250 - Width: 210 - Height: 250 + +Container@OBSERVER_WIDGETS: + Children: + SupportPowerBin@INGAME_POWERS_BIN: + X:0 + Y:25 + Button@INGAME_STATS_BUTTON: + X:162 + Y:0 + Width:160 + Height:25 + Text:Statistics (F1) + Font:Bold + Key:f1 + Background@RADAR_BG: + X:WINDOW_RIGHT-255 + Y:5 + Width:250 + Height:250 Children: - PerfGraph@GRAPH: - X:5 - Y:5 - Width:200 - Height:200 - Label@TEXT: - X:20 - Y:205 - Width:170 - Height:40 \ No newline at end of file + Radar@INGAME_RADAR: + X:10 + Y:10 + Width:PARENT_RIGHT-19 + Height:PARENT_BOTTOM-19 + WorldInteractionController:INTERACTION_CONTROLLER + DropDownButton@SHROUD_SELECTOR: + Logic:ObserverShroudSelectorLogic + X:WINDOW_RIGHT-250 + Y:260 + Width:240 + Height:25 + Font:Bold diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index b1ad56e14d..6eda3690b0 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -1,4 +1,4 @@ -Background@MAINMENU_BG: +Background@MAINMENU: X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 Width:250 @@ -88,146 +88,4 @@ Background@PERF_BG: X:20 Y:205 Width:170 - Height:40 -Background@MUSIC_MENU: - Logic:MusicPlayerLogic - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width: 450 - Height: 250 - Visible: true - Children: - Label@SETTINGS_LABEL_TITLE: - X:0 - Y:20 - Width:450 - Height:25 - Text:Music - Align:Center - Font:Bold - Button@BUTTON_INSTALL: - X:20 - Y:PARENT_BOTTOM - 45 - Width:160 - Height:25 - Text:Install Music - Font:Bold - Button@BUTTON_CLOSE: - X:PARENT_RIGHT - 180 - Y:PARENT_BOTTOM - 45 - Width:160 - Height:25 - Text:Close - Font:Bold - Key:escape - Container@BUTTONS: - X:PARENT_RIGHT - 150 - Y:50 - Children: - Button@BUTTON_PLAY: - X:35 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PLAY: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:play - Button@BUTTON_PAUSE: - Visible:false - X:35 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PAUSE: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:pause - Button@BUTTON_STOP: - X:70 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_STOP: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:stop - Button@BUTTON_NEXT: - X:105 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_NEXT: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:next - Button@BUTTON_PREV: - X:0 - Y:0 - Width:25 - Height:25 - Children: - Image@IMAGE_PREV: - X:0 - Y:0 - Width:25 - Height:25 - ImageCollection:music - ImageName:prev - Label@TIME: - X:PARENT_RIGHT - 150 - Y:75 - Width:140 - Height:25 - Align: Center - ScrollPanel@MUSIC_LIST: - X:10 - Y:50 - Width:280 - Height:140 - Children: - ScrollItem@MUSIC_TEMPLATE: - Width:PARENT_RIGHT-27 - Height:25 - X:2 - Y:0 - Visible:false - Children: - Label@TITLE: - X:5 - Width:PARENT_RIGHT - 10 - Height:PARENT_BOTTOM - Align: Left - Label@LENGTH: - X:5 - Width:PARENT_RIGHT - 10 - Height:PARENT_BOTTOM - Align: Right - Checkbox@SHUFFLE: - X:PARENT_RIGHT - 150 - Y:110 - Width:100 - Height:20 - Text:Shuffle - Checkbox@REPEAT: - X:PARENT_RIGHT - 150 - Y:140 - Width:100 - Height:20 - Text:Loop + Height:40 \ No newline at end of file diff --git a/mods/ra/chrome/musicplayer.yaml b/mods/ra/chrome/musicplayer.yaml new file mode 100644 index 0000000000..e37c415888 --- /dev/null +++ b/mods/ra/chrome/musicplayer.yaml @@ -0,0 +1,142 @@ +Background@MUSIC_MENU: + Logic:MusicPlayerLogic + X:(WINDOW_RIGHT - WIDTH)/2 + Y:(WINDOW_BOTTOM - HEIGHT)/2 + Width: 450 + Height: 250 + Visible: true + Children: + Label@SETTINGS_LABEL_TITLE: + X:0 + Y:20 + Width:450 + Height:25 + Text:Music + Align:Center + Font:Bold + Button@BUTTON_INSTALL: + X:20 + Y:PARENT_BOTTOM - 45 + Width:160 + Height:25 + Text:Install Music + Font:Bold + Button@BUTTON_CLOSE: + X:PARENT_RIGHT - 180 + Y:PARENT_BOTTOM - 45 + Width:160 + Height:25 + Text:Close + Font:Bold + Key:escape + Container@BUTTONS: + X:PARENT_RIGHT - 150 + Y:50 + Children: + Button@BUTTON_PLAY: + X:35 + Y:0 + Width:25 + Height:25 + Children: + Image@IMAGE_PLAY: + X:0 + Y:0 + Width:25 + Height:25 + ImageCollection:music + ImageName:play + Button@BUTTON_PAUSE: + Visible:false + X:35 + Y:0 + Width:25 + Height:25 + Children: + Image@IMAGE_PAUSE: + X:0 + Y:0 + Width:25 + Height:25 + ImageCollection:music + ImageName:pause + Button@BUTTON_STOP: + X:70 + Y:0 + Width:25 + Height:25 + Children: + Image@IMAGE_STOP: + X:0 + Y:0 + Width:25 + Height:25 + ImageCollection:music + ImageName:stop + Button@BUTTON_NEXT: + X:105 + Y:0 + Width:25 + Height:25 + Children: + Image@IMAGE_NEXT: + X:0 + Y:0 + Width:25 + Height:25 + ImageCollection:music + ImageName:next + Button@BUTTON_PREV: + X:0 + Y:0 + Width:25 + Height:25 + Children: + Image@IMAGE_PREV: + X:0 + Y:0 + Width:25 + Height:25 + ImageCollection:music + ImageName:prev + Label@TIME: + X:PARENT_RIGHT - 150 + Y:75 + Width:140 + Height:25 + Align: Center + ScrollPanel@MUSIC_LIST: + X:10 + Y:50 + Width:280 + Height:140 + Children: + ScrollItem@MUSIC_TEMPLATE: + Width:PARENT_RIGHT-27 + Height:25 + X:2 + Y:0 + Visible:false + Children: + Label@TITLE: + X:5 + Width:PARENT_RIGHT - 10 + Height:PARENT_BOTTOM + Align: Left + Label@LENGTH: + X:5 + Width:PARENT_RIGHT - 10 + Height:PARENT_BOTTOM + Align: Right + Checkbox@SHUFFLE: + X:PARENT_RIGHT - 150 + Y:110 + Width:100 + Height:20 + Text:Shuffle + Checkbox@REPEAT: + X:PARENT_RIGHT - 150 + Y:140 + Width:100 + Height:20 + Text:Loop \ No newline at end of file diff --git a/mods/ra/chrome/objectives.yaml b/mods/ra/chrome/objectives.yaml deleted file mode 100644 index 3da3275072..0000000000 --- a/mods/ra/chrome/objectives.yaml +++ /dev/null @@ -1,102 +0,0 @@ -Container@MISSION_OBJECTIVES: - Logic:MissionObjectivesLogic - X:25 - Y:50 - Width:512 - Height:530 - Children: - Background@BACKGROUND: - Width:512 - Height:530 - Background:dialog - Children: - Label@TITLE: - X:0 - Y:15 - Width:PARENT_RIGHT - Height:25 - Font:Bold - Align:Center - Text:Objectives - Label@PRIMARY_OBJECTIVE_HEADER: - X:40 - Y:40 - Width:300 - Height:25 - Font:Bold - Text:Primary Objectives - Label@PRIMARY_STATUS_HEADER: - X:350 - Y:40 - Width:122 - Height:25 - Font:Bold - Text:Status - ScrollPanel@PRIMARY_OBJECTIVES: - X:25 - Y:70 - Width:PARENT_RIGHT-50 - Height:200 - ItemSpacing:5 - Children: - Container@PRIMARY_OBJECTIVE_TEMPLATE: - X:15 - Y:0-15 - Width:PARENT_RIGHT - Height:60 - Children: - Label@PRIMARY_OBJECTIVE: - X:0 - Y:0 - Width:300 - Height:PARENT_BOTTOM - Font:Regular - WordWrap:True - Label@PRIMARY_STATUS: - X:310 - Y:0 - Width:122 - Height:PARENT_BOTTOM - Font:Bold - WordWrap:True - Label@SECONDARY_OBJECTIVE_HEADER: - X:40 - Y:275 - Width:300 - Height:25 - Font:Bold - Text:Secondary Objectives - Label@SECONDARY_STATUS_HEADER: - X:350 - Y:275 - Width:122 - Height:25 - Font:Bold - Text:Status - ScrollPanel@SECONDARY_OBJECTIVES: - X:25 - Y:305 - Width:PARENT_RIGHT-50 - Height:200 - ItemSpacing:5 - Children: - Container@SECONDARY_OBJECTIVE_TEMPLATE: - X:15 - Y:0-15 - Width:PARENT_RIGHT - Height:60 - Children: - Label@SECONDARY_OBJECTIVE: - X:0 - Y:0 - Width:300 - Height:PARENT_BOTTOM - Font:Regular - WordWrap:True - Label@SECONDARY_STATUS: - X:310 - Y:0 - Width:122 - Height:PARENT_BOTTOM - Font:Bold - WordWrap:True \ No newline at end of file diff --git a/mods/ra/maps/desert-shellmap/map.yaml b/mods/ra/maps/desert-shellmap/map.yaml index df29cd46ee..242f1e97d0 100644 --- a/mods/ra/maps/desert-shellmap/map.yaml +++ b/mods/ra/maps/desert-shellmap/map.yaml @@ -1321,6 +1321,8 @@ Rules: -SpawnMPUnits: -MPStartLocations: DesertShellmapScript: + LoadWidgetAtGameStart: + Widget: MAINMENU TRAN.Husk2: Burns: Damage: 0 diff --git a/mods/ra/maps/shellmap/map.yaml b/mods/ra/maps/shellmap/map.yaml index 3518d8361e..eeeb8f7b6f 100644 --- a/mods/ra/maps/shellmap/map.yaml +++ b/mods/ra/maps/shellmap/map.yaml @@ -1294,6 +1294,8 @@ Rules: DefaultShellmapScript: -SpawnMPUnits: -MPStartLocations: + LoadWidgetAtGameStart: + Widget: MAINMENU MSLO: Building: Power: 0 diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index d5f84e3c1b..9be827a088 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -56,8 +56,10 @@ ChromeLayout: mods/ra/chrome/gameinit.yaml mods/ra/chrome/ingame.yaml mods/ra/chrome/ingame-chat.yaml - mods/ra/chrome/ingame-observer.yaml mods/ra/chrome/ingame-fmvplayer.yaml + mods/ra/chrome/ingame-menu.yaml + mods/ra/chrome/ingame-objectives.yaml + mods/ra/chrome/ingame-observerstats.yaml mods/ra/chrome/mainmenu.yaml mods/ra/chrome/settings.yaml mods/ra/chrome/lobby.yaml @@ -69,7 +71,7 @@ ChromeLayout: mods/ra/chrome/dropdowns.yaml mods/ra/chrome/modchooser.yaml mods/ra/chrome/cheats.yaml - mods/ra/chrome/objectives.yaml + mods/ra/chrome/musicplayer.yaml mods/ra/chrome/tooltips.yaml Weapons: diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index a488151cf4..f039099f4f 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -506,9 +506,8 @@ Player: PlayerStatistics: World: - OpenWidgetAtGameStart: + LoadWidgetAtGameStart: Widget: INGAME_ROOT - ObserverWidget: OBSERVER_ROOT ScreenShaker: WaterPaletteRotation: ExcludePalettes: player