Split perf widgets into their own file.

This commit is contained in:
Paul Chote
2015-04-26 19:51:07 +12:00
parent da70683c03
commit e0ac3df373
9 changed files with 79 additions and 78 deletions

View File

@@ -625,6 +625,7 @@
<Compile Include="Traits\Pluggable.cs" />
<Compile Include="Traits\Plug.cs" />
<Compile Include="Widgets\Logic\Ingame\MenuButtonsChromeLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LoadIngamePerfLogic.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>

View File

@@ -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());
}
}
}

View File

@@ -2,6 +2,7 @@ Container@INGAME_ROOT:
Logic: LoadIngamePlayerOrObserverUILogic
Children:
Container@WORLD_ROOT:
Logic: LoadIngamePerfLogic
Children:
LogicTicker@DISCONNECT_WATCHER:
Logic: DisconnectWatcherLogic
@@ -27,7 +28,19 @@ Container@INGAME_ROOT:
StrategicProgress@STRATEGIC_PROGRESS:
X: WINDOW_RIGHT/2
Y: 40
Container@PERFORMANCE_INFO:
Container@PERF_ROOT:
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@PERF_WIDGETS:
Logic: PerfDebugLogic
Children:
Label@PERF_TEXT:
@@ -49,16 +62,6 @@ Container@INGAME_ROOT:
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:
Logic: MenuButtonsChromeLogic

View File

@@ -2,23 +2,18 @@ Container@INGAME_ROOT:
Logic: LoadIngamePlayerOrObserverUILogic
Children:
Container@WORLD_ROOT:
Logic: LoadIngamePerfLogic
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:
@@ -29,28 +24,7 @@ Container@INGAME_ROOT:
Y: 34
Order: Descending
Container@PLAYER_ROOT:
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
Children:
PerfGraph@GRAPH:
X: 5
Y: 5
Width: 200
Height: 200
Container@PERF_ROOT:
Container@GAME_TIMER_BLOCK:
Logic: GameTimerLogic
X: WINDOW_RIGHT/2 - WIDTH

View File

@@ -76,6 +76,7 @@ ChromeLayout:
./mods/d2k/chrome/ingame-observer.yaml
./mods/ra/chrome/ingame-observerstats.yaml
./mods/d2k/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-perf.yaml
./mods/ra/chrome/ingame-debug.yaml
./mods/d2k/chrome/ingame-leavemap.yaml
./mods/d2k/chrome/mainmenu.yaml

View 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

View File

@@ -2,23 +2,18 @@ Container@INGAME_ROOT:
Logic: LoadIngamePlayerOrObserverUILogic
Children:
Container@WORLD_ROOT:
Logic: LoadIngamePerfLogic
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:
@@ -29,27 +24,6 @@ Container@INGAME_ROOT:
Y: 10
Order: Descending
Container@PLAYER_ROOT:
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
Children:
PerfGraph@GRAPH:
X: 5
Y: 5
Width: 200
Height: 200
Container@PERF_ROOT:
Container@MENU_ROOT:
TooltipContainer@TOOLTIP_CONTAINER:

View File

@@ -91,6 +91,7 @@ ChromeLayout:
./mods/ra/chrome/ingame-observer.yaml
./mods/ra/chrome/ingame-observerstats.yaml
./mods/ra/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-perf.yaml
./mods/ra/chrome/ingame-debug.yaml
./mods/ra/chrome/mainmenu.yaml
./mods/ra/chrome/settings.yaml

View File

@@ -144,6 +144,7 @@ ChromeLayout:
./mods/d2k/chrome/ingame-observer.yaml
./mods/ra/chrome/ingame-observerstats.yaml
./mods/ts/chrome/ingame-player.yaml
./mods/ra/chrome/ingame-perf.yaml
./mods/ra/chrome/ingame-debug.yaml
./mods/ra/chrome/ingame-leavemap.yaml
./mods/ra/chrome/mainmenu.yaml