Split perf widgets into their own file.
This commit is contained in:
@@ -625,6 +625,7 @@
|
|||||||
<Compile Include="Traits\Pluggable.cs" />
|
<Compile Include="Traits\Pluggable.cs" />
|
||||||
<Compile Include="Traits\Plug.cs" />
|
<Compile Include="Traits\Plug.cs" />
|
||||||
<Compile Include="Widgets\Logic\Ingame\MenuButtonsChromeLogic.cs" />
|
<Compile Include="Widgets\Logic\Ingame\MenuButtonsChromeLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\Ingame\LoadIngamePerfLogic.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class LoadIngamePerfLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public LoadIngamePerfLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
var perfRoot = widget.Get("PERF_ROOT");
|
||||||
|
Game.LoadWidget(world, "PERF_WIDGETS", perfRoot, new WidgetArgs());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ Container@INGAME_ROOT:
|
|||||||
Logic: LoadIngamePlayerOrObserverUILogic
|
Logic: LoadIngamePlayerOrObserverUILogic
|
||||||
Children:
|
Children:
|
||||||
Container@WORLD_ROOT:
|
Container@WORLD_ROOT:
|
||||||
|
Logic: LoadIngamePerfLogic
|
||||||
Children:
|
Children:
|
||||||
LogicTicker@DISCONNECT_WATCHER:
|
LogicTicker@DISCONNECT_WATCHER:
|
||||||
Logic: DisconnectWatcherLogic
|
Logic: DisconnectWatcherLogic
|
||||||
@@ -27,28 +28,7 @@ Container@INGAME_ROOT:
|
|||||||
StrategicProgress@STRATEGIC_PROGRESS:
|
StrategicProgress@STRATEGIC_PROGRESS:
|
||||||
X: WINDOW_RIGHT/2
|
X: WINDOW_RIGHT/2
|
||||||
Y: 40
|
Y: 40
|
||||||
Container@PERFORMANCE_INFO:
|
Container@PERF_ROOT:
|
||||||
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
|
|
||||||
Children:
|
|
||||||
PerfGraph@GRAPH:
|
|
||||||
X: 10
|
|
||||||
Y: 10
|
|
||||||
Width: 200
|
|
||||||
Height: 200
|
|
||||||
WorldInteractionController@INTERACTION_CONTROLLER:
|
WorldInteractionController@INTERACTION_CONTROLLER:
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
@@ -60,6 +40,29 @@ Container@INGAME_ROOT:
|
|||||||
Container@MENU_ROOT:
|
Container@MENU_ROOT:
|
||||||
TooltipContainer@TOOLTIP_CONTAINER:
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
|
|
||||||
|
Container@PERF_WIDGETS:
|
||||||
|
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
|
||||||
|
Children:
|
||||||
|
PerfGraph@GRAPH:
|
||||||
|
X: 10
|
||||||
|
Y: 10
|
||||||
|
Width: 200
|
||||||
|
Height: 200
|
||||||
|
|
||||||
Container@OBSERVER_WIDGETS:
|
Container@OBSERVER_WIDGETS:
|
||||||
Logic: MenuButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
Children:
|
Children:
|
||||||
|
|||||||
@@ -2,23 +2,18 @@ Container@INGAME_ROOT:
|
|||||||
Logic: LoadIngamePlayerOrObserverUILogic
|
Logic: LoadIngamePlayerOrObserverUILogic
|
||||||
Children:
|
Children:
|
||||||
Container@WORLD_ROOT:
|
Container@WORLD_ROOT:
|
||||||
|
Logic: LoadIngamePerfLogic
|
||||||
Children:
|
Children:
|
||||||
LogicTicker@DISCONNECT_WATCHER:
|
LogicTicker@DISCONNECT_WATCHER:
|
||||||
Logic: DisconnectWatcherLogic
|
Logic: DisconnectWatcherLogic
|
||||||
WorldInteractionController@INTERACTION_CONTROLLER:
|
WorldInteractionController@INTERACTION_CONTROLLER:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
ViewportController:
|
ViewportController:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
TooltipContainer: TOOLTIP_CONTAINER
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
WorldCommand:
|
WorldCommand:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
StrategicProgress@STRATEGIC_PROGRESS:
|
StrategicProgress@STRATEGIC_PROGRESS:
|
||||||
@@ -29,28 +24,7 @@ Container@INGAME_ROOT:
|
|||||||
Y: 34
|
Y: 34
|
||||||
Order: Descending
|
Order: Descending
|
||||||
Container@PLAYER_ROOT:
|
Container@PLAYER_ROOT:
|
||||||
Container@PERFORMANCE_INFO:
|
Container@PERF_ROOT:
|
||||||
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
|
|
||||||
Children:
|
|
||||||
PerfGraph@GRAPH:
|
|
||||||
X: 5
|
|
||||||
Y: 5
|
|
||||||
Width: 200
|
|
||||||
Height: 200
|
|
||||||
Container@GAME_TIMER_BLOCK:
|
Container@GAME_TIMER_BLOCK:
|
||||||
Logic: GameTimerLogic
|
Logic: GameTimerLogic
|
||||||
X: WINDOW_RIGHT/2 - WIDTH
|
X: WINDOW_RIGHT/2 - WIDTH
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ ChromeLayout:
|
|||||||
./mods/d2k/chrome/ingame-observer.yaml
|
./mods/d2k/chrome/ingame-observer.yaml
|
||||||
./mods/ra/chrome/ingame-observerstats.yaml
|
./mods/ra/chrome/ingame-observerstats.yaml
|
||||||
./mods/d2k/chrome/ingame-player.yaml
|
./mods/d2k/chrome/ingame-player.yaml
|
||||||
|
./mods/ra/chrome/ingame-perf.yaml
|
||||||
./mods/ra/chrome/ingame-debug.yaml
|
./mods/ra/chrome/ingame-debug.yaml
|
||||||
./mods/d2k/chrome/ingame-leavemap.yaml
|
./mods/d2k/chrome/ingame-leavemap.yaml
|
||||||
./mods/d2k/chrome/mainmenu.yaml
|
./mods/d2k/chrome/mainmenu.yaml
|
||||||
|
|||||||
22
mods/ra/chrome/ingame-perf.yaml
Normal file
22
mods/ra/chrome/ingame-perf.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Container@PERF_WIDGETS:
|
||||||
|
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
|
||||||
|
Children:
|
||||||
|
PerfGraph@GRAPH:
|
||||||
|
X: 5
|
||||||
|
Y: 5
|
||||||
|
Width: 200
|
||||||
|
Height: 200
|
||||||
@@ -2,23 +2,18 @@ Container@INGAME_ROOT:
|
|||||||
Logic: LoadIngamePlayerOrObserverUILogic
|
Logic: LoadIngamePlayerOrObserverUILogic
|
||||||
Children:
|
Children:
|
||||||
Container@WORLD_ROOT:
|
Container@WORLD_ROOT:
|
||||||
|
Logic: LoadIngamePerfLogic
|
||||||
Children:
|
Children:
|
||||||
LogicTicker@DISCONNECT_WATCHER:
|
LogicTicker@DISCONNECT_WATCHER:
|
||||||
Logic: DisconnectWatcherLogic
|
Logic: DisconnectWatcherLogic
|
||||||
WorldInteractionController@INTERACTION_CONTROLLER:
|
WorldInteractionController@INTERACTION_CONTROLLER:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
ViewportController:
|
ViewportController:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
TooltipContainer: TOOLTIP_CONTAINER
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
WorldCommand:
|
WorldCommand:
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: WINDOW_RIGHT
|
Width: WINDOW_RIGHT
|
||||||
Height: WINDOW_BOTTOM
|
Height: WINDOW_BOTTOM
|
||||||
StrategicProgress@STRATEGIC_PROGRESS:
|
StrategicProgress@STRATEGIC_PROGRESS:
|
||||||
@@ -29,27 +24,6 @@ Container@INGAME_ROOT:
|
|||||||
Y: 10
|
Y: 10
|
||||||
Order: Descending
|
Order: Descending
|
||||||
Container@PLAYER_ROOT:
|
Container@PLAYER_ROOT:
|
||||||
Container@PERFORMANCE_INFO:
|
Container@PERF_ROOT:
|
||||||
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
|
|
||||||
Children:
|
|
||||||
PerfGraph@GRAPH:
|
|
||||||
X: 5
|
|
||||||
Y: 5
|
|
||||||
Width: 200
|
|
||||||
Height: 200
|
|
||||||
Container@MENU_ROOT:
|
Container@MENU_ROOT:
|
||||||
TooltipContainer@TOOLTIP_CONTAINER:
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ ChromeLayout:
|
|||||||
./mods/ra/chrome/ingame-observer.yaml
|
./mods/ra/chrome/ingame-observer.yaml
|
||||||
./mods/ra/chrome/ingame-observerstats.yaml
|
./mods/ra/chrome/ingame-observerstats.yaml
|
||||||
./mods/ra/chrome/ingame-player.yaml
|
./mods/ra/chrome/ingame-player.yaml
|
||||||
|
./mods/ra/chrome/ingame-perf.yaml
|
||||||
./mods/ra/chrome/ingame-debug.yaml
|
./mods/ra/chrome/ingame-debug.yaml
|
||||||
./mods/ra/chrome/mainmenu.yaml
|
./mods/ra/chrome/mainmenu.yaml
|
||||||
./mods/ra/chrome/settings.yaml
|
./mods/ra/chrome/settings.yaml
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ ChromeLayout:
|
|||||||
./mods/d2k/chrome/ingame-observer.yaml
|
./mods/d2k/chrome/ingame-observer.yaml
|
||||||
./mods/ra/chrome/ingame-observerstats.yaml
|
./mods/ra/chrome/ingame-observerstats.yaml
|
||||||
./mods/ts/chrome/ingame-player.yaml
|
./mods/ts/chrome/ingame-player.yaml
|
||||||
|
./mods/ra/chrome/ingame-perf.yaml
|
||||||
./mods/ra/chrome/ingame-debug.yaml
|
./mods/ra/chrome/ingame-debug.yaml
|
||||||
./mods/ra/chrome/ingame-leavemap.yaml
|
./mods/ra/chrome/ingame-leavemap.yaml
|
||||||
./mods/ra/chrome/mainmenu.yaml
|
./mods/ra/chrome/mainmenu.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user