Merge pull request #8034 from pchote/chrome-logic
Some chrome logic cleanups
This commit is contained in:
@@ -143,8 +143,8 @@ namespace OpenRA.Widgets
|
|||||||
public string Y = "0";
|
public string Y = "0";
|
||||||
public string Width = "0";
|
public string Width = "0";
|
||||||
public string Height = "0";
|
public string Height = "0";
|
||||||
public string Logic = null;
|
public string[] Logic = { };
|
||||||
public object LogicObject { get; private set; }
|
public object[] LogicObjects { get; private set; }
|
||||||
public bool Visible = true;
|
public bool Visible = true;
|
||||||
public bool IgnoreMouseOver;
|
public bool IgnoreMouseOver;
|
||||||
public bool IgnoreChildMouseOver;
|
public bool IgnoreChildMouseOver;
|
||||||
@@ -232,12 +232,13 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
public void PostInit(WidgetArgs args)
|
public void PostInit(WidgetArgs args)
|
||||||
{
|
{
|
||||||
if (Logic == null)
|
if (!Logic.Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
args["widget"] = this;
|
args["widget"] = this;
|
||||||
|
|
||||||
LogicObject = Game.ModData.ObjectCreator.CreateObject<object>(Logic, args);
|
LogicObjects = Logic.Select(l => Game.ModData.ObjectCreator.CreateObject<object>(l, args))
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
args.Remove("widget");
|
args.Remove("widget");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,6 +624,8 @@
|
|||||||
<Compile Include="Graphics\TilesetSpecificSpriteSequence.cs" />
|
<Compile Include="Graphics\TilesetSpecificSpriteSequence.cs" />
|
||||||
<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\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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
#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 System;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Mods.Common.Orders;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
|
using OpenRA.Mods.Common.Widgets;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class MenuButtonsChromeLogic
|
||||||
|
{
|
||||||
|
readonly World world;
|
||||||
|
readonly Widget worldRoot;
|
||||||
|
readonly Widget menuRoot;
|
||||||
|
bool disableSystemButtons;
|
||||||
|
Widget currentWidget;
|
||||||
|
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public MenuButtonsChromeLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
this.world = world;
|
||||||
|
|
||||||
|
worldRoot = Ui.Root.Get("WORLD_ROOT");
|
||||||
|
menuRoot = Ui.Root.Get("MENU_ROOT");
|
||||||
|
|
||||||
|
Action removeCurrentWidget = () => menuRoot.RemoveChild(currentWidget);
|
||||||
|
world.GameOver += removeCurrentWidget;
|
||||||
|
|
||||||
|
// System buttons
|
||||||
|
var options = widget.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
|
||||||
|
if (options != null)
|
||||||
|
{
|
||||||
|
var blinking = false;
|
||||||
|
var lp = world.LocalPlayer;
|
||||||
|
options.IsDisabled = () => disableSystemButtons;
|
||||||
|
options.OnClick = () =>
|
||||||
|
{
|
||||||
|
blinking = false;
|
||||||
|
OpenMenuPanel(options, new WidgetArgs()
|
||||||
|
{
|
||||||
|
{ "activePanel", IngameInfoPanel.AutoSelect }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
options.IsHighlighted = () => blinking && Game.LocalTick % 50 < 25;
|
||||||
|
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
Action<Player> startBlinking = player =>
|
||||||
|
{
|
||||||
|
if (player == world.LocalPlayer)
|
||||||
|
blinking = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var mo = lp.PlayerActor.TraitOrDefault<MissionObjectives>();
|
||||||
|
|
||||||
|
if (mo != null)
|
||||||
|
mo.ObjectiveAdded += startBlinking;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var diplomacy = widget.GetOrNull<MenuButtonWidget>("DIPLOMACY_BUTTON");
|
||||||
|
if (diplomacy != null)
|
||||||
|
{
|
||||||
|
diplomacy.Visible = !world.Map.Visibility.HasFlag(MapVisibility.MissionSelector) && world.Players.Any(a => a != world.LocalPlayer && !a.NonCombatant);
|
||||||
|
diplomacy.IsDisabled = () => disableSystemButtons;
|
||||||
|
diplomacy.OnClick = () => OpenMenuPanel(diplomacy);
|
||||||
|
}
|
||||||
|
|
||||||
|
var debug = widget.GetOrNull<MenuButtonWidget>("DEBUG_BUTTON");
|
||||||
|
if (debug != null)
|
||||||
|
{
|
||||||
|
debug.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats;
|
||||||
|
debug.IsDisabled = () => disableSystemButtons;
|
||||||
|
debug.OnClick = () => OpenMenuPanel(debug, new WidgetArgs()
|
||||||
|
{
|
||||||
|
{ "activePanel", IngameInfoPanel.Debug }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var stats = widget.GetOrNull<MenuButtonWidget>("OBSERVER_STATS_BUTTON");
|
||||||
|
if (stats != null)
|
||||||
|
{
|
||||||
|
stats.IsDisabled = () => disableSystemButtons;
|
||||||
|
stats.OnClick = () => OpenMenuPanel(stats);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OpenMenuPanel(MenuButtonWidget button, WidgetArgs widgetArgs = null)
|
||||||
|
{
|
||||||
|
disableSystemButtons = true;
|
||||||
|
var cachedPause = world.PredictedPaused;
|
||||||
|
|
||||||
|
if (button.HideIngameUI)
|
||||||
|
worldRoot.IsVisible = () => false;
|
||||||
|
|
||||||
|
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
||||||
|
world.SetPauseState(true);
|
||||||
|
|
||||||
|
widgetArgs = widgetArgs ?? new WidgetArgs();
|
||||||
|
widgetArgs.Add("onExit", () =>
|
||||||
|
{
|
||||||
|
if (button.HideIngameUI)
|
||||||
|
worldRoot.IsVisible = () => true;
|
||||||
|
|
||||||
|
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
||||||
|
world.SetPauseState(cachedPause);
|
||||||
|
|
||||||
|
menuRoot.RemoveChild(currentWidget);
|
||||||
|
disableSystemButtons = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
currentWidget = Game.LoadWidget(world, button.MenuContainer, menuRoot, widgetArgs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,141 +17,65 @@ using OpenRA.Widgets;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||||
{
|
{
|
||||||
public class OrderButtonsChromeLogic
|
public class SellOrderButtonLogic
|
||||||
{
|
{
|
||||||
readonly World world;
|
|
||||||
readonly Widget worldRoot;
|
|
||||||
readonly Widget menuRoot;
|
|
||||||
bool disableSystemButtons;
|
|
||||||
Widget currentWidget;
|
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public OrderButtonsChromeLogic(Widget widget, World world)
|
public SellOrderButtonLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
this.world = world;
|
var sell = widget as ButtonWidget;
|
||||||
var ingameRoot = Ui.Root.Get("INGAME_ROOT");
|
|
||||||
worldRoot = ingameRoot.Get("WORLD_ROOT");
|
|
||||||
menuRoot = ingameRoot.Get("MENU_ROOT");
|
|
||||||
|
|
||||||
Action removeCurrentWidget = () => menuRoot.RemoveChild(currentWidget);
|
|
||||||
world.GameOver += removeCurrentWidget;
|
|
||||||
|
|
||||||
// Order Buttons
|
|
||||||
var sell = widget.GetOrNull<ButtonWidget>("SELL_BUTTON");
|
|
||||||
if (sell != null)
|
if (sell != null)
|
||||||
{
|
{
|
||||||
sell.GetKey = _ => Game.Settings.Keys.SellKey;
|
sell.GetKey = _ => Game.Settings.Keys.SellKey;
|
||||||
BindOrderButton<SellOrderGenerator>(world, sell, "sell");
|
OrderButtonsChromeUtils.BindOrderButton<SellOrderGenerator>(world, sell, "sell");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var repair = widget.GetOrNull<ButtonWidget>("REPAIR_BUTTON");
|
public class RepairOrderButtonLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public RepairOrderButtonLogic(Widget widget, World world)
|
||||||
|
{
|
||||||
|
var repair = widget as ButtonWidget;
|
||||||
if (repair != null)
|
if (repair != null)
|
||||||
{
|
{
|
||||||
repair.GetKey = _ => Game.Settings.Keys.RepairKey;
|
repair.GetKey = _ => Game.Settings.Keys.RepairKey;
|
||||||
BindOrderButton<RepairOrderGenerator>(world, repair, "repair");
|
OrderButtonsChromeUtils.BindOrderButton<RepairOrderGenerator>(world, repair, "repair");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var beacon = widget.GetOrNull<ButtonWidget>("BEACON_BUTTON");
|
public class PowerdownOrderButtonLogic
|
||||||
if (beacon != null)
|
{
|
||||||
{
|
[ObjectCreator.UseCtor]
|
||||||
beacon.GetKey = _ => Game.Settings.Keys.PlaceBeaconKey;
|
public PowerdownOrderButtonLogic(Widget widget, World world)
|
||||||
BindOrderButton<BeaconOrderGenerator>(world, beacon, "beacon");
|
{
|
||||||
}
|
var power = widget as ButtonWidget;
|
||||||
|
|
||||||
var power = widget.GetOrNull<ButtonWidget>("POWER_BUTTON");
|
|
||||||
if (power != null)
|
if (power != null)
|
||||||
{
|
{
|
||||||
power.GetKey = _ => Game.Settings.Keys.PowerDownKey;
|
power.GetKey = _ => Game.Settings.Keys.PowerDownKey;
|
||||||
BindOrderButton<PowerDownOrderGenerator>(world, power, "power");
|
OrderButtonsChromeUtils.BindOrderButton<PowerDownOrderGenerator>(world, power, "power");
|
||||||
}
|
|
||||||
|
|
||||||
// System buttons
|
|
||||||
var options = widget.GetOrNull<MenuButtonWidget>("OPTIONS_BUTTON");
|
|
||||||
if (options != null)
|
|
||||||
{
|
|
||||||
var blinking = false;
|
|
||||||
var lp = world.LocalPlayer;
|
|
||||||
options.IsDisabled = () => disableSystemButtons;
|
|
||||||
options.OnClick = () =>
|
|
||||||
{
|
|
||||||
blinking = false;
|
|
||||||
OpenMenuPanel(options, new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "activePanel", IngameInfoPanel.AutoSelect }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
options.IsHighlighted = () => blinking && Game.LocalTick % 50 < 25;
|
|
||||||
|
|
||||||
if (lp != null)
|
|
||||||
{
|
|
||||||
Action<Player> startBlinking = player =>
|
|
||||||
{
|
|
||||||
if (player == world.LocalPlayer)
|
|
||||||
blinking = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var mo = lp.PlayerActor.TraitOrDefault<MissionObjectives>();
|
|
||||||
|
|
||||||
if (mo != null)
|
|
||||||
mo.ObjectiveAdded += startBlinking;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var diplomacy = widget.GetOrNull<MenuButtonWidget>("DIPLOMACY_BUTTON");
|
|
||||||
if (diplomacy != null)
|
|
||||||
{
|
|
||||||
diplomacy.Visible = !world.Map.Visibility.HasFlag(MapVisibility.MissionSelector) && world.Players.Any(a => a != world.LocalPlayer && !a.NonCombatant);
|
|
||||||
diplomacy.IsDisabled = () => disableSystemButtons;
|
|
||||||
diplomacy.OnClick = () => OpenMenuPanel(diplomacy);
|
|
||||||
}
|
|
||||||
|
|
||||||
var debug = widget.GetOrNull<MenuButtonWidget>("DEBUG_BUTTON");
|
|
||||||
if (debug != null)
|
|
||||||
{
|
|
||||||
debug.IsVisible = () => world.LobbyInfo.GlobalSettings.AllowCheats;
|
|
||||||
debug.IsDisabled = () => disableSystemButtons;
|
|
||||||
debug.OnClick = () => OpenMenuPanel(debug, new WidgetArgs()
|
|
||||||
{
|
|
||||||
{ "activePanel", IngameInfoPanel.Debug }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var stats = widget.GetOrNull<MenuButtonWidget>("OBSERVER_STATS_BUTTON");
|
|
||||||
if (stats != null)
|
|
||||||
{
|
|
||||||
stats.IsDisabled = () => disableSystemButtons;
|
|
||||||
stats.OnClick = () => OpenMenuPanel(stats);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OpenMenuPanel(MenuButtonWidget button, WidgetArgs widgetArgs = null)
|
public class BeaconOrderButtonLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public BeaconOrderButtonLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
disableSystemButtons = true;
|
var beacon = widget as ButtonWidget;
|
||||||
var cachedPause = world.PredictedPaused;
|
if (beacon != null)
|
||||||
|
|
||||||
if (button.HideIngameUI)
|
|
||||||
worldRoot.IsVisible = () => false;
|
|
||||||
|
|
||||||
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
|
||||||
world.SetPauseState(true);
|
|
||||||
|
|
||||||
widgetArgs = widgetArgs ?? new WidgetArgs();
|
|
||||||
widgetArgs.Add("onExit", () =>
|
|
||||||
{
|
{
|
||||||
if (button.HideIngameUI)
|
beacon.GetKey = _ => Game.Settings.Keys.PlaceBeaconKey;
|
||||||
worldRoot.IsVisible = () => true;
|
OrderButtonsChromeUtils.BindOrderButton<BeaconOrderGenerator>(world, beacon, "beacon");
|
||||||
|
}
|
||||||
if (button.Pause && world.LobbyInfo.IsSinglePlayer)
|
|
||||||
world.SetPauseState(cachedPause);
|
|
||||||
|
|
||||||
menuRoot.RemoveChild(currentWidget);
|
|
||||||
disableSystemButtons = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
currentWidget = Game.LoadWidget(world, button.MenuContainer, menuRoot, widgetArgs);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void BindOrderButton<T>(World world, ButtonWidget w, string icon)
|
public class OrderButtonsChromeUtils
|
||||||
|
{
|
||||||
|
public static void BindOrderButton<T>(World world, ButtonWidget w, string icon)
|
||||||
where T : IOrderGenerator, new()
|
where T : IOrderGenerator, new()
|
||||||
{
|
{
|
||||||
w.OnClick = () => world.ToggleInputMode<T>();
|
w.OnClick = () => world.ToggleInputMode<T>();
|
||||||
|
|||||||
@@ -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,8 +40,31 @@ 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: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
Children:
|
Children:
|
||||||
MenuButton@OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
Key: escape
|
Key: escape
|
||||||
@@ -237,7 +240,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ReadyText: Ready
|
ReadyText: Ready
|
||||||
HoldText: On Hold
|
HoldText: On Hold
|
||||||
Background@SIDEBAR_BACKGROUND:
|
Background@SIDEBAR_BACKGROUND:
|
||||||
Logic: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
X: WINDOW_RIGHT - 204
|
X: WINDOW_RIGHT - 204
|
||||||
Y: 30
|
Y: 30
|
||||||
Width: 194
|
Width: 194
|
||||||
@@ -260,6 +263,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
ImageName: options
|
ImageName: options
|
||||||
Button@BEACON_BUTTON:
|
Button@BEACON_BUTTON:
|
||||||
|
Logic: BeaconOrderButtonLogic
|
||||||
X: 62
|
X: 62
|
||||||
Y: 0-24
|
Y: 0-24
|
||||||
Width: 30
|
Width: 30
|
||||||
@@ -273,6 +277,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 5
|
Y: 5
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@SELL_BUTTON:
|
Button@SELL_BUTTON:
|
||||||
|
Logic: SellOrderButtonLogic
|
||||||
X: 102
|
X: 102
|
||||||
Y: 0-24
|
Y: 0-24
|
||||||
Width: 30
|
Width: 30
|
||||||
@@ -286,6 +291,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 5
|
Y: 5
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@REPAIR_BUTTON:
|
Button@REPAIR_BUTTON:
|
||||||
|
Logic: RepairOrderButtonLogic
|
||||||
X: 142
|
X: 142
|
||||||
Y: 0-24
|
Y: 0-24
|
||||||
Width: 30
|
Width: 30
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
Container@OBSERVER_WIDGETS:
|
Container@OBSERVER_WIDGETS:
|
||||||
|
Logic: MenuButtonsChromeLogic
|
||||||
Children:
|
Children:
|
||||||
MenuButton@OPTIONS_BUTTON:
|
MenuButton@OPTIONS_BUTTON:
|
||||||
Logic: OrderButtonsChromeLogic
|
|
||||||
X: 0
|
|
||||||
Y: 0
|
|
||||||
Width: 160
|
Width: 160
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Options (Esc)
|
Text: Options (Esc)
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: escape
|
Key: escape
|
||||||
MenuButton@OBSERVER_STATS_BUTTON:
|
MenuButton@OBSERVER_STATS_BUTTON:
|
||||||
Logic: OrderButtonsChromeLogic
|
|
||||||
MenuContainer: INGAME_OBSERVERSTATS_BG
|
MenuContainer: INGAME_OBSERVERSTATS_BG
|
||||||
HideIngameUI: False
|
HideIngameUI: False
|
||||||
Pause: False
|
Pause: False
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ClickThrough: false
|
ClickThrough: false
|
||||||
Children:
|
Children:
|
||||||
Container@TOP_BUTTONS:
|
Container@TOP_BUTTONS:
|
||||||
Logic: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
X: 16
|
X: 16
|
||||||
Y: 236
|
Y: 236
|
||||||
Children:
|
Children:
|
||||||
@@ -54,6 +54,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
ImageName: debug
|
ImageName: debug
|
||||||
Button@REPAIR_BUTTON:
|
Button@REPAIR_BUTTON:
|
||||||
|
Logic: RepairOrderButtonLogic
|
||||||
X: 29
|
X: 29
|
||||||
Width: 34
|
Width: 34
|
||||||
Height: 35
|
Height: 35
|
||||||
@@ -67,6 +68,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 0
|
Y: 0
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@SELL_BUTTON:
|
Button@SELL_BUTTON:
|
||||||
|
Logic: SellOrderButtonLogic
|
||||||
X: 54
|
X: 54
|
||||||
Width: 34
|
Width: 34
|
||||||
Height: 35
|
Height: 35
|
||||||
@@ -80,6 +82,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 0
|
Y: 0
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@BEACON_BUTTON:
|
Button@BEACON_BUTTON:
|
||||||
|
Logic: BeaconOrderButtonLogic
|
||||||
X: 108
|
X: 108
|
||||||
Width: 36
|
Width: 36
|
||||||
Height: 35
|
Height: 35
|
||||||
@@ -94,6 +97,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
|
|
||||||
Button@POWER_BUTTON:
|
Button@POWER_BUTTON:
|
||||||
|
Logic: PowerdownOrderButtonLogic
|
||||||
X: 133
|
X: 133
|
||||||
Width: 36
|
Width: 36
|
||||||
Height: 35
|
Height: 35
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Container@OBSERVER_WIDGETS:
|
|||||||
Align: Right
|
Align: Right
|
||||||
Font: TinyBold
|
Font: TinyBold
|
||||||
Container@TOP_BUTTONS:
|
Container@TOP_BUTTONS:
|
||||||
Logic: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
X: 9
|
X: 9
|
||||||
Y: 7
|
Y: 7
|
||||||
Children:
|
Children:
|
||||||
|
|||||||
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
|
||||||
@@ -36,12 +36,12 @@ Container@PLAYER_WIDGETS:
|
|||||||
ClickThrough: false
|
ClickThrough: false
|
||||||
Children:
|
Children:
|
||||||
Container@TOP_BUTTONS:
|
Container@TOP_BUTTONS:
|
||||||
Logic: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
X: 9
|
X: 9
|
||||||
Y: 7
|
Y: 7
|
||||||
Children:
|
Children:
|
||||||
Button@BEACON_BUTTON:
|
Button@BEACON_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: BeaconOrderButtonLogic, AddRaceSuffixLogic
|
||||||
Width: 28
|
Width: 28
|
||||||
Height: 28
|
Height: 28
|
||||||
Background: sidebar-button
|
Background: sidebar-button
|
||||||
@@ -54,7 +54,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 6
|
Y: 6
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@SELL_BUTTON:
|
Button@SELL_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: SellOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 32
|
X: 32
|
||||||
Width: 28
|
Width: 28
|
||||||
Height: 28
|
Height: 28
|
||||||
@@ -68,7 +68,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 6
|
Y: 6
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@POWER_BUTTON:
|
Button@POWER_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: PowerdownOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 64
|
X: 64
|
||||||
Width: 28
|
Width: 28
|
||||||
Height: 28
|
Height: 28
|
||||||
@@ -82,7 +82,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 6
|
Y: 6
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@REPAIR_BUTTON:
|
Button@REPAIR_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: RepairOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 96
|
X: 96
|
||||||
Width: 28
|
Width: 28
|
||||||
Height: 28
|
Height: 28
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ClickThrough: false
|
ClickThrough: false
|
||||||
Children:
|
Children:
|
||||||
Container@TOP_BUTTONS:
|
Container@TOP_BUTTONS:
|
||||||
Logic: OrderButtonsChromeLogic
|
Logic: MenuButtonsChromeLogic
|
||||||
X: 0
|
X: 0
|
||||||
Y: 21
|
Y: 21
|
||||||
Children:
|
Children:
|
||||||
@@ -58,7 +58,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
ImageName: debug
|
ImageName: debug
|
||||||
Button@REPAIR_BUTTON:
|
Button@REPAIR_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: RepairOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 43
|
X: 43
|
||||||
Width: 30
|
Width: 30
|
||||||
Height: 31
|
Height: 31
|
||||||
@@ -73,7 +73,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 0
|
Y: 0
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@SELL_BUTTON:
|
Button@SELL_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: SellOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 73
|
X: 73
|
||||||
Width: 30
|
Width: 30
|
||||||
Height: 31
|
Height: 31
|
||||||
@@ -88,7 +88,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 0
|
Y: 0
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@BEACON_BUTTON:
|
Button@BEACON_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: BeaconOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 103
|
X: 103
|
||||||
Width: 30
|
Width: 30
|
||||||
Height: 31
|
Height: 31
|
||||||
@@ -103,7 +103,7 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y: 0
|
Y: 0
|
||||||
ImageCollection: order-icons
|
ImageCollection: order-icons
|
||||||
Button@POWER_BUTTON:
|
Button@POWER_BUTTON:
|
||||||
Logic: AddRaceSuffixLogic
|
Logic: PowerdownOrderButtonLogic, AddRaceSuffixLogic
|
||||||
X: 133
|
X: 133
|
||||||
Width: 30
|
Width: 30
|
||||||
Height: 31
|
Height: 31
|
||||||
|
|||||||
@@ -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