Add HPF overlay controls to observer chrome

This commit is contained in:
Ivaylo Draganov
2022-11-04 13:33:38 +02:00
committed by abcdefg30
parent 2b57b6be1d
commit 18e36b96db
13 changed files with 76 additions and 68 deletions

View File

@@ -0,0 +1,24 @@
#region Copyright & License Information
/*
* Copyright 2007-2022 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class LoadIngameHierarchicalPathFinderOverlayLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public LoadIngameHierarchicalPathFinderOverlayLogic(Widget widget, World world)
{
Game.LoadWidget(world, "HPF_OVERLAY", widget, new WidgetArgs());
}
}
}

View File

@@ -74,6 +74,11 @@ Container@OBSERVER_WIDGETS:
Children:
Container@CHAT_ROOT:
Container@PERF_ROOT:
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 270
Y: 40
Width: 175
ViewportController:
Width: WINDOW_RIGHT
Height: WINDOW_BOTTOM
@@ -1159,6 +1164,11 @@ Container@PLAYER_WIDGETS:
Children:
Container@CHAT_ROOT:
Container@PERF_ROOT:
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 240
Y: 40
Width: 175
ViewportController:
Width: WINDOW_RIGHT
Height: WINDOW_BOTTOM
@@ -1876,25 +1886,6 @@ Container@PLAYER_WIDGETS:
Y: 299
Width: 194
Height: 20
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 240
Y: 40
Width: 175
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular
Background@FMVPLAYER:
Width: WINDOW_RIGHT

View File

@@ -119,6 +119,7 @@ ChromeLayout:
common|chrome/ingame-transients.yaml
cnc|chrome/ingame-menu.yaml
cnc|chrome/ingame-debug.yaml
common|chrome/ingame-debug-hpf.yaml
cnc|chrome/ingame-infochat.yaml
cnc|chrome/ingame-info.yaml
cnc|chrome/ingame-infobriefing.yaml

View File

@@ -0,0 +1,17 @@
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
Width: PARENT_RIGHT
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular

View File

@@ -1032,3 +1032,8 @@ Container@OBSERVER_WIDGETS:
YAxisLabel: Army Value
LabelFont: TinyBold
AxisFont: TinyBold
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 260
Y: 40
Width: 175

View File

@@ -641,22 +641,8 @@ Container@PLAYER_WIDGETS:
Y: 5
ImageCollection: scrollpanel-decorations
ImageName: down
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 231
Y: 40
Width: 175
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular

View File

@@ -83,6 +83,7 @@ ChromeLayout:
d2k|chrome/ingame-player.yaml
common|chrome/ingame-perf.yaml
common|chrome/ingame-debug.yaml
common|chrome/ingame-debug-hpf.yaml
common|chrome/ingame-debuginfo.yaml
common|chrome/ingame-infochat.yaml
d2k|chrome/mainmenu.yaml

View File

@@ -1096,3 +1096,8 @@ Container@OBSERVER_WIDGETS:
YAxisLabel: Army Value
LabelFont: TinyBold
AxisFont: TinyBold
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 255
Y: 40
Width: 175

View File

@@ -649,23 +649,8 @@ Container@PLAYER_WIDGETS:
Y: 4
ImageCollection: power-icons
ImageName: power-normal
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 260
Y: 40
Width: 175
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular

View File

@@ -100,6 +100,7 @@ ChromeLayout:
ra|chrome/ingame-player.yaml
common|chrome/ingame-perf.yaml
common|chrome/ingame-debug.yaml
common|chrome/ingame-debug-hpf.yaml
common|chrome/ingame-debuginfo.yaml
common|chrome/ingame-infochat.yaml
common|chrome/mainmenu.yaml

View File

@@ -1041,3 +1041,8 @@ Container@OBSERVER_WIDGETS:
YAxisLabel: Army Value
LabelFont: TinyBold
AxisFont: TinyBold
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 260
Y: 40
Width: 175

View File

@@ -619,22 +619,8 @@ Container@PLAYER_WIDGETS:
Background: scrolldown-buttons
TooltipText: Scroll down
TooltipContainer: TOOLTIP_CONTAINER
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
Container@HPF_ROOT:
Logic: LoadIngameHierarchicalPathFinderOverlayLogic
X: WINDOW_RIGHT - WIDTH - 245
Y: 40
Width: 175
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular

View File

@@ -144,6 +144,7 @@ ChromeLayout:
ts|chrome/ingame-player.yaml
common|chrome/ingame-perf.yaml
ts|chrome/ingame-debug.yaml
common|chrome/ingame-debug-hpf.yaml
common|chrome/ingame-debuginfo.yaml
common|chrome/ingame-infochat.yaml
common|chrome/mainmenu.yaml