From 77b77d1c76b77e0b8ade5ce5350f7a88e20211b4 Mon Sep 17 00:00:00 2001 From: penev92 Date: Mon, 2 Oct 2023 00:20:51 +0300 Subject: [PATCH] Added an ingame-observer.yaml file OpenRA PR 20436 removed the common file that none of the default mods use, so adding a copy of the one from TS here. Removed redundant (and crashing) references to HPF and statistics widgets - the world actor doesn't have the necessary traits because it doesn't need them, so the widgets crash. --- mods/example/chrome/ingame-observer.yaml | 182 +++++++++++++++++++++++ mods/example/mod.chrome.yaml | 2 +- 2 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 mods/example/chrome/ingame-observer.yaml diff --git a/mods/example/chrome/ingame-observer.yaml b/mods/example/chrome/ingame-observer.yaml new file mode 100644 index 0000000..0cde94c --- /dev/null +++ b/mods/example/chrome/ingame-observer.yaml @@ -0,0 +1,182 @@ +Container@OBSERVER_WIDGETS: + Logic: MenuButtonsChromeLogic, LoadIngameChatLogic + Children: + Container@CHAT_ROOT: + LogicKeyListener@OBSERVER_KEY_LISTENER: + Container@MUTE_INDICATOR: + Logic: MuteIndicatorLogic + X: WINDOW_RIGHT - WIDTH - 260 + Y: 5 + Width: 200 + Height: 25 + Children: + Image@ICON: + X: PARENT_RIGHT - WIDTH + Y: 1 + Width: 24 + Height: 24 + ImageCollection: sidebar-bits + ImageName: indicator-muted + Label@LABEL: + Width: PARENT_RIGHT - 30 + Height: 25 + Align: Right + Text: Audio Muted + Contrast: true + MenuButton@OPTIONS_BUTTON: + X: 5 + Y: 5 + Width: 160 + Height: 25 + Text: Options (Esc) + Font: Bold + Key: escape + DisableWorldSounds: true + Container@GAME_TIMER_BLOCK: + Logic: GameTimerLogic + X: (WINDOW_RIGHT - WIDTH) / 2 + Width: 100 + Height: 55 + Children: + LabelWithTooltip@GAME_TIMER: + Width: PARENT_RIGHT + Height: 30 + Align: Center + Font: Title + Contrast: true + TooltipContainer: TOOLTIP_CONTAINER + TooltipTemplate: SIMPLE_TOOLTIP + Label@GAME_TIMER_STATUS: + Y: 32 + Width: PARENT_RIGHT + Height: 15 + Align: Center + Font: Bold + Contrast: true + 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 + VideoPlayer@PLAYER: + X: 10 + Y: 10 + Width: PARENT_RIGHT - 20 + Height: PARENT_BOTTOM - 20 + Skippable: false + Background@OBSERVER_CONTROL_BG: + X: WINDOW_RIGHT - 255 + Y: 260 + Width: 250 + Height: 55 + Children: + DropDownButton@SHROUD_SELECTOR: + Logic: ObserverShroudSelectorLogic + CombinedViewKey: ObserverCombinedView + WorldViewKey: ObserverWorldView + X: 15 + Y: 15 + Width: 220 + Height: 25 + Font: Bold + Children: + LogicKeyListener@SHROUD_KEYHANDLER: + Image@FLAG: + Width: 23 + Height: 23 + X: 2 + Y: 5 + Label@LABEL: + X: 34 + Width: PARENT_RIGHT + Height: 25 + Shadow: True + Label@NOFLAG_LABEL: + X: 5 + Width: PARENT_RIGHT + Height: 25 + Shadow: True + Container@REPLAY_PLAYER: + Logic: ReplayControlBarLogic + Y: 39 + Width: 160 + Height: 35 + Visible: false + Children: + Button@BUTTON_PAUSE: + X: 15 + Y: 10 + Width: 26 + Height: 26 + Key: Pause + TooltipText: Pause + TooltipContainer: TOOLTIP_CONTAINER + IgnoreChildMouseOver: true + Children: + Image@IMAGE_PAUSE: + X: 5 + Y: 5 + ImageCollection: music + ImageName: pause + Button@BUTTON_PLAY: + X: 15 + Y: 10 + Width: 26 + Height: 26 + Key: Pause + TooltipText: Play + TooltipContainer: TOOLTIP_CONTAINER + IgnoreChildMouseOver: true + Children: + Image@IMAGE_PLAY: + X: 5 + Y: 5 + ImageCollection: music + ImageName: play + Button@BUTTON_SLOW: + X: 55 + Y: 13 + Width: 36 + Height: 20 + Key: ReplaySpeedSlow + TooltipText: Slow speed + TooltipContainer: TOOLTIP_CONTAINER + Text: 50% + Font: TinyBold + Button@BUTTON_REGULAR: + X: 55 + 45 + Y: 13 + Width: 38 + Height: 20 + Key: ReplaySpeedRegular + TooltipText: Regular speed + TooltipContainer: TOOLTIP_CONTAINER + Text: 100% + Font: TinyBold + Button@BUTTON_FAST: + X: 55 + 45 * 2 + Y: 13 + Width: 38 + Height: 20 + Key: ReplaySpeedFast + TooltipText: Fast speed + TooltipContainer: TOOLTIP_CONTAINER + Text: 200% + Font: TinyBold + Button@BUTTON_MAXIMUM: + X: 55 + 45 * 3 + Y: 13 + Width: 38 + Height: 20 + Key: ReplaySpeedMax + TooltipText: Maximum speed + TooltipContainer: TOOLTIP_CONTAINER + Text: MAX + Font: TinyBold diff --git a/mods/example/mod.chrome.yaml b/mods/example/mod.chrome.yaml index 40dabce..e558371 100644 --- a/mods/example/mod.chrome.yaml +++ b/mods/example/mod.chrome.yaml @@ -24,8 +24,8 @@ ChromeLayout: common|chrome/ingame-infoscripterror.yaml common|chrome/ingame-infostats.yaml common|chrome/ingame-menu.yaml - common|chrome/ingame-observer.yaml common|chrome/ingame-perf.yaml + example|chrome/ingame-observer.yaml example|chrome/layouts/ingame-player.yaml common|chrome/ingame-transients.yaml common|chrome/lobby.yaml