diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/LoadIngamePlayerOrObserverUILogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/LoadIngamePlayerOrObserverUILogic.cs index 3a002f50d2..1e8fc96a07 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/LoadIngamePlayerOrObserverUILogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/LoadIngamePlayerOrObserverUILogic.cs @@ -19,7 +19,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic public LoadIngamePlayerOrObserverUILogic(Widget widget, World world) { var ingameRoot = widget.Get("INGAME_ROOT"); - var playerRoot = ingameRoot.Get("PLAYER_ROOT"); + var worldRoot = ingameRoot.Get("WORLD_ROOT"); + var menuRoot = ingameRoot.Get("MENU_ROOT"); + var playerRoot = worldRoot.Get("PLAYER_ROOT"); if (world.LocalPlayer == null) Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs()); @@ -40,14 +42,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; } - Game.LoadWidget(world, "CHAT_PANEL", ingameRoot, new WidgetArgs()); + Game.LoadWidget(world, "CHAT_PANEL", worldRoot, new WidgetArgs()); - Action showLeaveMapWidget = () => + world.GameOver += () => { - ingameRoot.RemoveChildren(); - Game.LoadWidget(world, "LEAVE_MAP_WIDGET", Ui.Root, new WidgetArgs()); + worldRoot.RemoveChildren(); + menuRoot.RemoveChildren(); + Game.LoadWidget(world, "LEAVE_MAP_WIDGET", menuRoot, new WidgetArgs()); }; - world.GameOver += showLeaveMapWidget; } } } diff --git a/OpenRA.Mods.D2k/Widgets/Logic/IngameChromeLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/IngameChromeLogic.cs index 6a79edab70..6206171aaf 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/IngameChromeLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/IngameChromeLogic.cs @@ -25,7 +25,9 @@ namespace OpenRA.Mods.D2k.Widgets.Logic { public class IngameChromeLogic { - readonly Widget gameRoot; + readonly Widget ingameRoot; + readonly Widget worldRoot; + readonly Widget menuRoot; readonly Widget playerRoot; readonly World world; @@ -33,8 +35,10 @@ namespace OpenRA.Mods.D2k.Widgets.Logic public IngameChromeLogic(World world) { this.world = world; - gameRoot = Ui.Root.Get("INGAME_ROOT"); - playerRoot = gameRoot.Get("PLAYER_ROOT"); + ingameRoot = Ui.Root.Get("INGAME_ROOT"); + worldRoot = ingameRoot.Get("WORLD_ROOT"); + menuRoot = ingameRoot.Get("MENU_ROOT"); + playerRoot = worldRoot.Get("PLAYER_ROOT"); InitRootWidgets(); if (world.LocalPlayer == null) @@ -45,14 +49,14 @@ namespace OpenRA.Mods.D2k.Widgets.Logic void InitRootWidgets() { - Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs()); + Game.LoadWidget(world, "CHAT_PANEL", worldRoot, new WidgetArgs()); - Action ShowLeaveMapWidget = () => + world.GameOver += () => { - gameRoot.RemoveChildren(); - Game.LoadWidget(world, "LEAVE_MAP_WIDGET", Ui.Root, new WidgetArgs()); + worldRoot.RemoveChildren(); + menuRoot.RemoveChildren(); + Game.LoadWidget(world, "LEAVE_MAP_WIDGET", menuRoot, new WidgetArgs()); }; - world.GameOver += ShowLeaveMapWidget; } void InitObserverWidgets() diff --git a/OpenRA.Mods.RA/Widgets/Logic/Ingame/LeaveMapLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/Ingame/LeaveMapLogic.cs index 6236eeb038..f0c08a1161 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/Ingame/LeaveMapLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/Ingame/LeaveMapLogic.cs @@ -31,6 +31,10 @@ namespace OpenRA.Mods.RA.Widgets { this.orderManager = orderManager; + var mpe = world.WorldActor.TraitOrDefault(); + if (mpe != null) + mpe.Fade(mpe.Info.MenuEffect); + widget.Get("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version; var showStats = false; @@ -95,7 +99,6 @@ namespace OpenRA.Mods.RA.Widgets leaveButton.OnClick = () => { leaveButton.Disabled = true; - var mpe = world.WorldActor.TraitOrDefault(); Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Country.Race); diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs index 369f6841fe..48251b8ef5 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameMenuLogic.cs @@ -56,7 +56,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic Action closeMenu = () => { Ui.CloseWindow(); - Ui.Root.RemoveChild(menu); if (mpe != null) mpe.Fade(MenuPaletteEffect.EffectType.None); onExit(); @@ -110,12 +109,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic resumeButton.IsDisabled = () => resumeDisabled; resumeButton.OnClick = closeMenu; - // Game info panel - var gameInfoPanel = Game.LoadWidget(world, "GAME_INFO_PANEL", menu, new WidgetArgs() + var panelRoot = widget.GetOrNull("PANEL_ROOT"); + if (panelRoot != null) { - { "activePanel", activePanel } - }); - gameInfoPanel.IsVisible = () => !hideMenu; + var gameInfoPanel = Game.LoadWidget(world, "GAME_INFO_PANEL", panelRoot, new WidgetArgs() + { + { "activePanel", activePanel } + }); + + gameInfoPanel.IsVisible = () => !hideMenu; + } } } } diff --git a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs index e0b6e7860f..359ec0b4c6 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs @@ -20,7 +20,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic public class OrderButtonsChromeLogic { readonly World world; - readonly Widget ingameRoot; + readonly Widget worldRoot; + readonly Widget menuRoot; bool disableSystemButtons; Widget currentWidget; @@ -28,9 +29,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic public OrderButtonsChromeLogic(Widget widget, World world) { this.world = world; - ingameRoot = Ui.Root.Get("INGAME_ROOT"); + var ingameRoot = Ui.Root.Get("INGAME_ROOT"); + worldRoot = ingameRoot.Get("WORLD_ROOT"); + menuRoot = ingameRoot.Get("MENU_ROOT"); - Action removeCurrentWidget = () => Ui.Root.RemoveChild(currentWidget); + Action removeCurrentWidget = () => menuRoot.RemoveChild(currentWidget); world.GameOver += removeCurrentWidget; // Order Buttons @@ -127,7 +130,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var cachedPause = world.PredictedPaused; if (button.HideIngameUI) - ingameRoot.IsVisible = () => false; + worldRoot.IsVisible = () => false; if (button.Pause && world.LobbyInfo.IsSinglePlayer) world.SetPauseState(true); @@ -136,15 +139,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic widgetArgs.Add("onExit", () => { if (button.HideIngameUI) - ingameRoot.IsVisible = () => true; + worldRoot.IsVisible = () => true; if (button.Pause && world.LobbyInfo.IsSinglePlayer) world.SetPauseState(cachedPause); + menuRoot.RemoveChild(currentWidget); disableSystemButtons = false; }); - currentWidget = Game.LoadWidget(world, button.MenuContainer, Ui.Root, widgetArgs); + currentWidget = Game.LoadWidget(world, button.MenuContainer, menuRoot, widgetArgs); } static void BindOrderButton(World world, ButtonWidget w, string icon) diff --git a/mods/cnc/chrome/ingame-infobriefing.yaml b/mods/cnc/chrome/ingame-infobriefing.yaml index 57e4d87ff6..d99aca53b8 100644 --- a/mods/cnc/chrome/ingame-infobriefing.yaml +++ b/mods/cnc/chrome/ingame-infobriefing.yaml @@ -1,5 +1,5 @@ Container@MAP_PANEL: - Height: PARENT_BOTTOM + Height: PARENT_BOTTOM Width: PARENT_RIGHT Logic: GameInfoBriefingLogic Children: diff --git a/mods/cnc/chrome/ingame-leavemap.yaml b/mods/cnc/chrome/ingame-leavemap.yaml index 9484644156..6acdc1e86a 100644 --- a/mods/cnc/chrome/ingame-leavemap.yaml +++ b/mods/cnc/chrome/ingame-leavemap.yaml @@ -18,7 +18,7 @@ Container@LEAVE_MAP_WIDGET: Width: WINDOW_RIGHT Height: WINDOW_BOTTOM Background: shellmapborder - Container@LEAVE_MAP_SIMPLE + Container@LEAVE_MAP_SIMPLE: X: (WINDOW_RIGHT - WIDTH) / 2 Y: (WINDOW_BOTTOM - HEIGHT) / 2 Width: 370 diff --git a/mods/cnc/chrome/ingame-menu.yaml b/mods/cnc/chrome/ingame-menu.yaml index 859a57978c..0cf8a5a81d 100644 --- a/mods/cnc/chrome/ingame-menu.yaml +++ b/mods/cnc/chrome/ingame-menu.yaml @@ -20,6 +20,7 @@ Container@INGAME_MENU: Width: WINDOW_RIGHT Height: WINDOW_BOTTOM Background: shellmapborder + Container@PANEL_ROOT: Container@MENU_BUTTONS: X: (WINDOW_RIGHT-WIDTH)/2 Y: WINDOW_BOTTOM-33-HEIGHT-10 diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 026bf53477..7bfef3082d 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -1,60 +1,63 @@ Container@INGAME_ROOT: Logic: LoadIngamePlayerOrObserverUILogic Children: - LogicTicker@DISCONNECT_WATCHER: - Logic: DisconnectWatcherLogic - Container@GAME_TIMER_BLOCK: - Logic: GameTimerLogic - X: WINDOW_RIGHT/2 - WIDTH - Width: 100 - Height: 55 + Container@WORLD_ROOT: Children: - Label@GAME_TIMER: - Width: PARENT_RIGHT - Height: 30 - Align: Center - Font: Title - Contrast: true - Label@GAME_TIMER_STATUS: - Y: 35 - Width: PARENT_RIGHT - Height: 15 - Align: Center - Font: Bold - Contrast: true - StrategicProgress@STRATEGIC_PROGRESS: - X: WINDOW_RIGHT/2 - Y: 40 - Container@PERFORMANCE_INFO: - Logic: PerfDebugLogic - Children: - Label@PERF_TEXT: - X: WINDOW_RIGHT - 200 - Y: WINDOW_BOTTOM - 70 - Width: 170 - Height: 40 - Contrast: true - VAlign: Top - Background@GRAPH_BG: - X: 10 - Y: WINDOW_BOTTOM-HEIGHT-10 - Width: 220 - Height: 220 - Background: panel-black + LogicTicker@DISCONNECT_WATCHER: + Logic: DisconnectWatcherLogic + Container@GAME_TIMER_BLOCK: + Logic: GameTimerLogic + X: WINDOW_RIGHT/2 - WIDTH + Width: 100 + Height: 55 Children: - PerfGraph@GRAPH: + Label@GAME_TIMER: + Width: PARENT_RIGHT + Height: 30 + Align: Center + Font: Title + Contrast: true + Label@GAME_TIMER_STATUS: + Y: 35 + Width: PARENT_RIGHT + Height: 15 + Align: Center + Font: Bold + Contrast: true + StrategicProgress@STRATEGIC_PROGRESS: + X: WINDOW_RIGHT/2 + Y: 40 + Container@PERFORMANCE_INFO: + Logic: PerfDebugLogic + Children: + Label@PERF_TEXT: + X: WINDOW_RIGHT - 200 + Y: WINDOW_BOTTOM - 70 + Width: 170 + Height: 40 + Contrast: true + VAlign: Top + Background@GRAPH_BG: X: 10 - Y: 10 - Width: 200 - Height: 200 - WorldInteractionController@INTERACTION_CONTROLLER: - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - ViewportController: - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - TooltipContainer: TOOLTIP_CONTAINER - Container@PLAYER_ROOT: + Y: WINDOW_BOTTOM-HEIGHT-10 + Width: 220 + Height: 220 + Background: panel-black + Children: + PerfGraph@GRAPH: + X: 10 + Y: 10 + Width: 200 + Height: 200 + WorldInteractionController@INTERACTION_CONTROLLER: + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + ViewportController: + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + TooltipContainer: TOOLTIP_CONTAINER + Container@PLAYER_ROOT: + Container@MENU_ROOT: TooltipContainer@TOOLTIP_CONTAINER: Container@OBSERVER_WIDGETS: diff --git a/mods/d2k/chrome/ingame-menu.yaml b/mods/d2k/chrome/ingame-menu.yaml index 66e8f5484d..61d6286484 100644 --- a/mods/d2k/chrome/ingame-menu.yaml +++ b/mods/d2k/chrome/ingame-menu.yaml @@ -9,6 +9,7 @@ Container@INGAME_MENU: Align: Right Font: Regular Contrast: True + Container@PANEL_ROOT: Background@MENU_BUTTONS: X: 13 + (WINDOW_RIGHT - 522) / 4 - WIDTH / 2 Y: (WINDOW_BOTTOM - HEIGHT)/2 diff --git a/mods/d2k/chrome/ingame-observer.yaml b/mods/d2k/chrome/ingame-observer.yaml index 3aa2336b2d..f7464a2fa0 100644 --- a/mods/d2k/chrome/ingame-observer.yaml +++ b/mods/d2k/chrome/ingame-observer.yaml @@ -1,5 +1,14 @@ Container@OBSERVER_WIDGETS: Children: + MenuButton@OPTIONS_BUTTON: + Logic: OrderButtonsChromeLogic + X: 0 + Y: 0 + Width: 160 + Height: 25 + Text: Options (Esc) + Font: Bold + Key: escape MenuButton@OBSERVER_STATS_BUTTON: Logic: OrderButtonsChromeLogic MenuContainer: INGAME_OBSERVERSTATS_BG diff --git a/mods/d2k/chrome/ingame-player.yaml b/mods/d2k/chrome/ingame-player.yaml index e60ff102b8..ae9f50481b 100644 --- a/mods/d2k/chrome/ingame-player.yaml +++ b/mods/d2k/chrome/ingame-player.yaml @@ -3,6 +3,15 @@ Container@PLAYER_WIDGETS: LogicKeyListener@CONTROLGROUP_KEYHANDLER: Logic: ControlGroupLogic LogicTicker@SIDEBAR_TICKER: + MenuButton@OPTIONS_BUTTON: + Logic: OrderButtonsChromeLogic + X: 0 + Y: 0 + Width: 160 + Height: 25 + Text: Options (Esc) + Font: Bold + Key: escape MenuButton@DIPLOMACY_BUTTON: Logic: OrderButtonsChromeLogic MenuContainer: INGAME_DIPLOMACY_BG diff --git a/mods/d2k/chrome/ingame.yaml b/mods/d2k/chrome/ingame.yaml index ba99368f3b..56ac6acc44 100644 --- a/mods/d2k/chrome/ingame.yaml +++ b/mods/d2k/chrome/ingame.yaml @@ -1,81 +1,74 @@ Container@INGAME_ROOT: Logic: IngameChromeLogic Children: - LogicTicker@DISCONNECT_WATCHER: - Logic: DisconnectWatcherLogic - WorldInteractionController@INTERACTION_CONTROLLER: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - ViewportController: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - TooltipContainer: TOOLTIP_CONTAINER - WorldCommand: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - Container@GAME_TIMER_BLOCK: - Logic: GameTimerLogic - X: WINDOW_RIGHT/2 - WIDTH - Width: 100 - Height: 55 + Container@WORLD_ROOT: Children: - Label@GAME_TIMER: - Width: PARENT_RIGHT - Height: 30 - Align: Center - Font: Title - Contrast: true - Label@GAME_TIMER_STATUS: - Y: 32 - Width: PARENT_RIGHT - Height: 15 - Align: Center - Font: Bold - Contrast: true - StrategicProgress@STRATEGIC_PROGRESS: - X: WINDOW_RIGHT/2 - Y: 40 - SupportPowerTimer@SUPPORT_POWER_TIMER: - X: 80 - Y: 34 - Order: Descending - Container@PLAYER_ROOT: - MenuButton@OPTIONS_BUTTON: - Logic: OrderButtonsChromeLogic - X: 0 - Y: 0 - Width: 160 - Height: 25 - Text: Options (Esc) - Font: Bold - Key: escape - Container@PERFORMANCE_INFO: - Logic: PerfDebugLogic - Children: - Label@PERF_TEXT: - X: WINDOW_RIGHT - 200 - Y: WINDOW_BOTTOM - 70 - Width: 170 - Height: 40 - Contrast: true - Background@GRAPH_BG: - ClickThrough: true - Background: dialog4 - X: 30 - Y: WINDOW_BOTTOM - 240 - Width: 210 - Height: 210 + LogicTicker@DISCONNECT_WATCHER: + Logic: DisconnectWatcherLogic + WorldInteractionController@INTERACTION_CONTROLLER: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + ViewportController: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + TooltipContainer: TOOLTIP_CONTAINER + WorldCommand: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + StrategicProgress@STRATEGIC_PROGRESS: + X: WINDOW_RIGHT/2 + Y: 40 + SupportPowerTimer@SUPPORT_POWER_TIMER: + X: 80 + Y: 34 + Order: Descending + Container@PLAYER_ROOT: + Container@PERFORMANCE_INFO: + Logic: PerfDebugLogic Children: - PerfGraph@GRAPH: - X: 5 - Y: 5 - Width: 200 - Height: 200 + Label@PERF_TEXT: + X: WINDOW_RIGHT - 200 + Y: WINDOW_BOTTOM - 70 + Width: 170 + Height: 40 + Contrast: true + Background@GRAPH_BG: + ClickThrough: true + Background: dialog4 + X: 30 + Y: WINDOW_BOTTOM - 240 + Width: 210 + Height: 210 + Children: + PerfGraph@GRAPH: + X: 5 + Y: 5 + Width: 200 + Height: 200 + Container@GAME_TIMER_BLOCK: + Logic: GameTimerLogic + X: WINDOW_RIGHT/2 - WIDTH + Width: 100 + Height: 55 + Children: + Label@GAME_TIMER: + Width: PARENT_RIGHT + Height: 30 + Align: Center + Font: Title + Contrast: true + Label@GAME_TIMER_STATUS: + Y: 32 + Width: PARENT_RIGHT + Height: 15 + Align: Center + Font: Bold + Contrast: true + Container@MENU_ROOT: TooltipContainer@TOOLTIP_CONTAINER: - diff --git a/mods/ra/chrome/ingame-leavemap.yaml b/mods/ra/chrome/ingame-leavemap.yaml index 10aca4d920..74776c26de 100644 --- a/mods/ra/chrome/ingame-leavemap.yaml +++ b/mods/ra/chrome/ingame-leavemap.yaml @@ -20,7 +20,7 @@ Container@LEAVE_MAP_WIDGET: Align: Center Font: Regular Contrast: True - Container@LEAVE_MAP_SIMPLE + Container@LEAVE_MAP_SIMPLE: X: (WINDOW_RIGHT - WIDTH) / 2 Y: (WINDOW_BOTTOM - HEIGHT) / 2 Width: 370 diff --git a/mods/ra/chrome/ingame-menu.yaml b/mods/ra/chrome/ingame-menu.yaml index 5d2bc325b0..19783bc110 100644 --- a/mods/ra/chrome/ingame-menu.yaml +++ b/mods/ra/chrome/ingame-menu.yaml @@ -22,6 +22,7 @@ Container@INGAME_MENU: Align: Center Font: Regular Contrast: True + Container@PANEL_ROOT: Background@MENU_BUTTONS: X: 13 + (WINDOW_RIGHT - 522) / 4 - WIDTH / 2 Y: (WINDOW_BOTTOM - HEIGHT)/2 diff --git a/mods/ra/chrome/ingame.yaml b/mods/ra/chrome/ingame.yaml index e24e7b3ca5..5aca23ea24 100644 --- a/mods/ra/chrome/ingame.yaml +++ b/mods/ra/chrome/ingame.yaml @@ -1,53 +1,55 @@ Container@INGAME_ROOT: Logic: LoadIngamePlayerOrObserverUILogic Children: - LogicTicker@DISCONNECT_WATCHER: - Logic: DisconnectWatcherLogic - WorldInteractionController@INTERACTION_CONTROLLER: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - ViewportController: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - TooltipContainer: TOOLTIP_CONTAINER - WorldCommand: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - StrategicProgress@STRATEGIC_PROGRESS: - X: WINDOW_RIGHT/2 - Y: 40 - SupportPowerTimer@SUPPORT_POWER_TIMER: - X: 80 - Y: 10 - Order: Descending - Container@PLAYER_ROOT: - Container@PERFORMANCE_INFO: - Logic: PerfDebugLogic + Container@WORLD_ROOT: Children: - Label@PERF_TEXT: - X: WINDOW_RIGHT - 200 - Y: WINDOW_BOTTOM - 70 - Width: 170 - Height: 40 - Contrast: true - Background@GRAPH_BG: - ClickThrough: true - Background: dialog4 - X: 30 - Y: WINDOW_BOTTOM - 240 - Width: 210 - Height: 210 + LogicTicker@DISCONNECT_WATCHER: + Logic: DisconnectWatcherLogic + WorldInteractionController@INTERACTION_CONTROLLER: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + ViewportController: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + TooltipContainer: TOOLTIP_CONTAINER + WorldCommand: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + StrategicProgress@STRATEGIC_PROGRESS: + X: WINDOW_RIGHT/2 + Y: 40 + SupportPowerTimer@SUPPORT_POWER_TIMER: + X: 80 + Y: 10 + Order: Descending + Container@PLAYER_ROOT: + Container@PERFORMANCE_INFO: + Logic: PerfDebugLogic Children: - PerfGraph@GRAPH: - X: 5 - Y: 5 - Width: 200 - Height: 200 + Label@PERF_TEXT: + X: WINDOW_RIGHT - 200 + Y: WINDOW_BOTTOM - 70 + Width: 170 + Height: 40 + Contrast: true + Background@GRAPH_BG: + ClickThrough: true + Background: dialog4 + X: 30 + Y: WINDOW_BOTTOM - 240 + Width: 210 + Height: 210 + Children: + PerfGraph@GRAPH: + X: 5 + Y: 5 + Width: 200 + Height: 200 + Container@MENU_ROOT: TooltipContainer@TOOLTIP_CONTAINER: - diff --git a/mods/ts/chrome/ingame-player.yaml b/mods/ts/chrome/ingame-player.yaml index 3804db6a7e..9a9cba3a0c 100644 --- a/mods/ts/chrome/ingame-player.yaml +++ b/mods/ts/chrome/ingame-player.yaml @@ -3,6 +3,16 @@ Container@PLAYER_WIDGETS: LogicKeyListener@CONTROLGROUP_KEYHANDLER: Logic: ControlGroupLogic LogicTicker@SIDEBAR_TICKER: + MenuButton@OPTIONS_BUTTON: + Logic: OrderButtonsChromeLogic + MenuContainer: INGAME_MENU + X: 0 + Y: 0 + Width: 160 + Height: 25 + Text: Options (Esc) + Font: Bold + Key: escape MenuButton@DIPLOMACY_BUTTON: Logic: OrderButtonsChromeLogic MenuContainer: INGAME_DIPLOMACY_BG diff --git a/mods/ts/chrome/ingame.yaml b/mods/ts/chrome/ingame.yaml index c470852efe..a547fccddf 100644 --- a/mods/ts/chrome/ingame.yaml +++ b/mods/ts/chrome/ingame.yaml @@ -1,82 +1,74 @@ Container@INGAME_ROOT: Logic: IngameChromeLogic Children: - LogicTicker@DISCONNECT_WATCHER: - Logic: DisconnectWatcherLogic - WorldInteractionController@INTERACTION_CONTROLLER: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - ViewportController: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - TooltipContainer: TOOLTIP_CONTAINER - WorldCommand: - X: 0 - Y: 0 - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - Container@GAME_TIMER_BLOCK: - Logic: GameTimerLogic - X: WINDOW_RIGHT/2 - WIDTH - Width: 100 - Height: 55 + Container@WORLD_ROOT: Children: - Label@GAME_TIMER: - Width: PARENT_RIGHT - Height: 15 - Align: Center - Font: Title - Contrast: true - Label@GAME_TIMER_STATUS: - Y: 35 - Width: PARENT_RIGHT - Height: 15 - Align: Center - Font: Bold - Contrast: true - StrategicProgress@STRATEGIC_PROGRESS: - X: WINDOW_RIGHT/2 - Y: 40 - SupportPowerTimer@SUPPORT_POWER_TIMER: - X: 80 - Y: 34 - Order: Descending - Container@PLAYER_ROOT: - MenuButton@OPTIONS_BUTTON: - Logic: OrderButtonsChromeLogic - MenuContainer: INGAME_MENU - X: 0 - Y: 0 - Width: 160 - Height: 25 - Text: Options (Esc) - Font: Bold - Key: escape - Container@PERFORMANCE_INFO: - Logic: PerfDebugLogic - Children: - Label@PERF_TEXT: - X: WINDOW_RIGHT - 200 - Y: WINDOW_BOTTOM - 70 - Width: 170 - Height: 40 - Contrast: true - Background@GRAPH_BG: - ClickThrough: true - Background: dialog4 - X: 30 - Y: WINDOW_BOTTOM - 240 - Width: 210 - Height: 210 + LogicTicker@DISCONNECT_WATCHER: + Logic: DisconnectWatcherLogic + WorldInteractionController@INTERACTION_CONTROLLER: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + ViewportController: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + TooltipContainer: TOOLTIP_CONTAINER + WorldCommand: + X: 0 + Y: 0 + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + StrategicProgress@STRATEGIC_PROGRESS: + X: WINDOW_RIGHT/2 + Y: 40 + SupportPowerTimer@SUPPORT_POWER_TIMER: + X: 80 + Y: 34 + Order: Descending + Container@PLAYER_ROOT: + Container@PERFORMANCE_INFO: + Logic: PerfDebugLogic Children: - PerfGraph@GRAPH: - X: 5 - Y: 5 - Width: 200 - Height: 200 + Label@PERF_TEXT: + X: WINDOW_RIGHT - 200 + Y: WINDOW_BOTTOM - 70 + Width: 170 + Height: 40 + Contrast: true + Background@GRAPH_BG: + ClickThrough: true + Background: dialog4 + X: 30 + Y: WINDOW_BOTTOM - 240 + Width: 210 + Height: 210 + Children: + PerfGraph@GRAPH: + X: 5 + Y: 5 + Width: 200 + Height: 200 + Container@GAME_TIMER_BLOCK: + Logic: GameTimerLogic + X: WINDOW_RIGHT/2 - WIDTH + Width: 100 + Height: 55 + Children: + Label@GAME_TIMER: + Width: PARENT_RIGHT + Height: 15 + Align: Center + Font: Title + Contrast: true + Label@GAME_TIMER_STATUS: + Y: 35 + Width: PARENT_RIGHT + Height: 15 + Align: Center + Font: Bold + Contrast: true + Container@MENU_ROOT: TooltipContainer@TOOLTIP_CONTAINER: -