eradicate 'delegate' misuse

This commit is contained in:
Chris Forbes
2011-05-22 21:58:39 +12:00
parent 4b12a19af0
commit ef03d46f13
72 changed files with 234 additions and 269 deletions

View File

@@ -137,7 +137,6 @@ namespace OpenRA.Widgets
}
int2 lastMouseLocation;
// TODO: ScrollPanelWidget doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (mi.Button == MouseButton.WheelDown)

View File

@@ -68,7 +68,6 @@ namespace OpenRA.Widgets
Offset = ((newOffset - Little) / Spread).Clamp(0f, 1f);
}
// TODO: SliderWidget doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (mi.Button != MouseButton.Left)

View File

@@ -58,7 +58,6 @@ namespace OpenRA.Widgets
return lose;
}
// TODO: TextFieldWidgets don't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (IsDisabled())

View File

@@ -34,7 +34,6 @@ namespace OpenRA.Widgets
protected ViewportScrollControllerWidget(ViewportScrollControllerWidget widget) : base(widget) {}
public override void DrawInner() {}
// TODO: ViewportScrollController doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
var scrolltype = Game.Settings.Game.MouseScroll;

View File

@@ -25,8 +25,8 @@ namespace OpenRA.Widgets
public string Y = "0";
public string Width = "0";
public string Height = "0";
public string Delegate = null;
public IWidgetDelegate DelegateObject {get; private set;}
public string Logic = null;
public object LogicObject { get; private set; }
public bool Visible = true;
public readonly List<Widget> Children = new List<Widget>();
@@ -61,7 +61,7 @@ namespace OpenRA.Widgets
Y = widget.Y;
Width = widget.Width;
Height = widget.Height;
Delegate = widget.Delegate;
Logic = widget.Logic;
Visible = widget.Visible;
Bounds = widget.Bounds;
@@ -126,13 +126,13 @@ namespace OpenRA.Widgets
public void PostInit(WidgetArgs args)
{
if (Delegate == null)
if (Logic == null)
return;
args["widget"] = this;
DelegateObject = Game.modData.ObjectCreator.CreateObject<IWidgetDelegate>(Delegate, args);
var iwd = DelegateObject as IWidgetDelegateEx;
LogicObject = Game.modData.ObjectCreator.CreateObject<object>(Logic, args);
var iwd = LogicObject as ILogicWithInit;
if (iwd != null)
iwd.Init();
@@ -229,7 +229,7 @@ namespace OpenRA.Widgets
// TODO: Solve this properly
public virtual bool HandleMouseInput(MouseInput mi)
{
// Apply any special logic added by delegates; they return true if they caught the input
// Apply any special logic added by event handlers; they return true if they caught the input
if (mi.Event == MouseInputEvent.Down && OnMouseDown(mi)) return true;
if (mi.Event == MouseInputEvent.Up && OnMouseUp(mi)) return true;
if (mi.Event == MouseInputEvent.Move)
@@ -252,7 +252,7 @@ namespace OpenRA.Widgets
// Do any widgety behavior (enter text etc)
var handled = HandleKeyPressInner(e);
// Apply any special logic added by delegates; they return true if they caught the input
// Apply any special logic added by event handlers; they return true if they caught the input
if (OnKeyPress(e)) return true;
return handled;
@@ -372,10 +372,9 @@ namespace OpenRA.Widgets
public void Add(string key, Action val) { base.Add(key, val); }
}
public interface IWidgetDelegate { }
// TODO: This can die once ra init is sane
[Obsolete] public interface IWidgetDelegateEx : IWidgetDelegate
// TODO: you should use this anywhere you want to do
// something in a logic ctor, but retain debuggability.
public interface ILogicWithInit
{
void Init();
}

View File

@@ -57,7 +57,6 @@ namespace OpenRA.Widgets
int2 dragStart, dragEnd;
// TODO: WorldInteractionController doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
var xy = Game.viewport.ViewToWorldPx(mi);

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -70,26 +70,26 @@
<Compile Include="CncWaterPaletteRotation.cs" />
<Compile Include="AttackPopupTurreted.cs" />
<Compile Include="SpawnViceroid.cs" />
<Compile Include="Widgets\CncMenuLogic.cs" />
<Compile Include="Widgets\CncServerBrowserLogic.cs" />
<Compile Include="Widgets\CncLobbyLogic.cs" />
<Compile Include="Widgets\CncReplayBrowserLogic.cs" />
<Compile Include="Widgets\CncServerCreationLogic.cs" />
<Compile Include="Widgets\CncMapChooserLogic.cs" />
<Compile Include="Widgets\CncConnectionLogic.cs" />
<Compile Include="Widgets\CncIngameChromeLogic.cs" />
<Compile Include="Widgets\CncInstallLogic.cs" />
<Compile Include="Widgets\CncMusicPlayerLogic.cs" />
<Compile Include="Widgets\Logic\CncMenuLogic.cs" />
<Compile Include="Widgets\Logic\CncServerBrowserLogic.cs" />
<Compile Include="Widgets\Logic\CncLobbyLogic.cs" />
<Compile Include="Widgets\Logic\CncReplayBrowserLogic.cs" />
<Compile Include="Widgets\Logic\CncServerCreationLogic.cs" />
<Compile Include="Widgets\Logic\CncMapChooserLogic.cs" />
<Compile Include="Widgets\Logic\CncConnectionLogic.cs" />
<Compile Include="Widgets\Logic\CncIngameChromeLogic.cs" />
<Compile Include="Widgets\Logic\CncInstallLogic.cs" />
<Compile Include="Widgets\Logic\CncMusicPlayerLogic.cs" />
<Compile Include="CncColorPickerPaletteModifier.cs" />
<Compile Include="Widgets\CncModBrowserLogic.cs" />
<Compile Include="Widgets\CncPerfDebugLogic.cs" />
<Compile Include="Widgets\CncSettingsLogic.cs" />
<Compile Include="Widgets\CncCheatsLogic.cs" />
<Compile Include="Widgets\CncInstallFromCDLogic.cs" />
<Compile Include="Widgets\CncDownloadPackagesLogic.cs" />
<Compile Include="Widgets\Logic\CncModBrowserLogic.cs" />
<Compile Include="Widgets\Logic\CncPerfDebugLogic.cs" />
<Compile Include="Widgets\Logic\CncSettingsLogic.cs" />
<Compile Include="Widgets\Logic\CncCheatsLogic.cs" />
<Compile Include="Widgets\Logic\CncInstallFromCDLogic.cs" />
<Compile Include="Widgets\Logic\CncDownloadPackagesLogic.cs" />
<Compile Include="CncMenuPaletteEffect.cs" />
<Compile Include="Widgets\CncIngameMenuLogic.cs" />
<Compile Include="Widgets\CncDiplomacyLogic.cs" />
<Compile Include="Widgets\Logic\CncIngameMenuLogic.cs" />
<Compile Include="Widgets\Logic\CncDiplomacyLogic.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
@@ -121,8 +121,4 @@
copy "$(TargetPath)" "$(SolutionDir)mods/cnc/"
cd "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Folder Include="Activities\" />
<Folder Include="Widgets\" />
</ItemGroup>
</Project>

View File

@@ -22,9 +22,9 @@ using System;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncCheatsLogic : IWidgetDelegate
public class CncCheatsLogic
{
[ObjectCreator.UseCtor]
public CncCheatsLogic([ObjectCreator.Param] Widget widget,

View File

@@ -12,9 +12,9 @@ using System;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncConnectingLogic : IWidgetDelegate
public class CncConnectingLogic
{
static bool staticSetup;
Action onConnect, onRetry, onAbort;
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (panel == null)
return;
var handler = panel.DelegateObject as CncConnectingLogic;
var handler = panel.LogicObject as CncConnectingLogic;
if (handler == null)
return;
@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Cnc.Widgets
}
}
public class CncConnectionFailedLogic : IWidgetDelegate
public class CncConnectionFailedLogic
{
[ObjectCreator.UseCtor]
public CncConnectionFailedLogic([ObjectCreator.Param] Widget widget,

View File

@@ -9,17 +9,13 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Mods.RA;
using OpenRA.Widgets;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
using System.Linq;
using System.Collections.Generic;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncDiplomacyLogic : IWidgetDelegate
public class CncDiplomacyLogic
{
World world;

View File

@@ -17,9 +17,9 @@ using System.Net;
using OpenRA.FileFormats;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncDownloadPackagesLogic : IWidgetDelegate
public class CncDownloadPackagesLogic
{
Widget panel;
Dictionary<string,string> installData;

View File

@@ -8,16 +8,13 @@
*/
#endregion
using System;
using System.Drawing;
using OpenRA.Mods.RA;
using OpenRA.Widgets;
using OpenRA.Mods.RA.Activities;
using System.Linq;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncIngameChromeLogic : IWidgetDelegate
public class CncIngameChromeLogic
{
enum MenuType { None, Diplomacy, Cheats }
MenuType menu = MenuType.None;
@@ -31,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (panel == null)
return;
var handler = panel.DelegateObject as CncIngameChromeLogic;
var handler = panel.LogicObject as CncIngameChromeLogic;
if (handler == null)
return;

View File

@@ -9,14 +9,12 @@
#endregion
using System;
using System.Drawing;
using OpenRA.Mods.RA;
using OpenRA.Widgets;
using OpenRA.Mods.RA.Activities;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncIngameMenuLogic : IWidgetDelegate
public class CncIngameMenuLogic
{
Widget menu;

View File

@@ -16,9 +16,9 @@ using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncInstallFromCDLogic : IWidgetDelegate
public class CncInstallFromCDLogic
{
Widget panel;
ProgressBarWidget progressBar;

View File

@@ -12,9 +12,9 @@ using System;
using System.Collections.Generic;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncInstallLogic : IWidgetDelegate
public class CncInstallLogic
{
[ObjectCreator.UseCtor]
public CncInstallLogic([ObjectCreator.Param] Widget widget,

View File

@@ -18,9 +18,9 @@ using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncLobbyLogic : IWidgetDelegate
public class CncLobbyLogic
{
Widget LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost;
ScrollPanelWidget chatPanel;
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (panel == null)
return null;
return panel.DelegateObject as CncLobbyLogic;
return panel.LogicObject as CncLobbyLogic;
}
static void LobbyInfoChangedStub()
@@ -588,7 +588,7 @@ namespace OpenRA.Mods.Cnc.Widgets
}
}
public class CncColorPickerLogic : IWidgetDelegate
public class CncColorPickerLogic
{
ColorRamp ramp;
[ObjectCreator.UseCtor]

View File

@@ -11,12 +11,11 @@
using System;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncMapChooserLogic : IWidgetDelegate
public class CncMapChooserLogic
{
Map map;
Widget scrollpanel;

View File

@@ -10,12 +10,11 @@
using System.Linq;
using System.Net;
using OpenRA.Mods.RA;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncMenuLogic : IWidgetDelegate
public class CncMenuLogic
{
enum MenuType
{

View File

@@ -12,12 +12,11 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncModBrowserLogic : IWidgetDelegate
public class CncModBrowserLogic
{
Mod currentMod;

View File

@@ -15,13 +15,12 @@ using System.Threading;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncMusicPlayerLogic : IWidgetDelegate
public class CncMusicPlayerLogic
{
bool installed;
MusicInfo currentSong = null;
@@ -185,7 +184,7 @@ namespace OpenRA.Mods.Cnc.Widgets
}
public class CncInstallMusicLogic : IWidgetDelegate
public class CncInstallMusicLogic
{
Widget panel;
ProgressBarWidget progressBar;

View File

@@ -8,13 +8,12 @@
*/
#endregion
using System;
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncPerfDebugLogic : IWidgetDelegate
public class CncPerfDebugLogic
{
[ObjectCreator.UseCtor]
public CncPerfDebugLogic([ObjectCreator.Param] Widget widget)

View File

@@ -11,13 +11,12 @@
using System;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Widgets.Delegates;
using OpenRA.Mods.RA.Widgets.Logic;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncReplayBrowserLogic : IWidgetDelegate
public class CncReplayBrowserLogic
{
Widget panel;

View File

@@ -11,13 +11,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.RA.Widgets.Delegates;
using OpenRA.Mods.RA.Widgets.Logic;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncServerBrowserLogic : IWidgetDelegate
public class CncServerBrowserLogic
{
GameServer currentServer;
ScrollItemWidget serverTemplate;
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Cnc.Widgets
};
var join = panel.GetWidget<ButtonWidget>("JOIN_BUTTON");
join.IsDisabled = () => currentServer == null || !ServerBrowserDelegate.CanJoin(currentServer);
join.IsDisabled = () => currentServer == null || !ServerBrowserLogic.CanJoin(currentServer);
join.OnClick = () =>
{
if (currentServer == null)
@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Cnc.Widgets
var infoPanel = panel.GetWidget("SERVER_INFO");
infoPanel.IsVisible = () => currentServer != null;
infoPanel.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address;
infoPanel.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => ServerBrowserDelegate.GenerateModsLabel(currentServer);
infoPanel.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => ServerBrowserLogic.GenerateModsLabel(currentServer);
infoPanel.GetWidget<LabelWidget>("MAP_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown";
infoPanel.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () => GetPlayersLabel(currentServer);
@@ -142,7 +142,7 @@ namespace OpenRA.Mods.Cnc.Widgets
return;
}
var gamesWaiting = games.Where(g => ServerBrowserDelegate.CanJoin(g));
var gamesWaiting = games.Where(g => ServerBrowserLogic.CanJoin(g));
if (gamesWaiting.Count() == 0)
{
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Cnc.Widgets
}
}
public class CncDirectConnectLogic : IWidgetDelegate
public class CncDirectConnectLogic
{
[ObjectCreator.UseCtor]
public CncDirectConnectLogic([ObjectCreator.Param] Widget widget,

View File

@@ -14,9 +14,9 @@ using System.Net;
using OpenRA.GameRules;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncServerCreationLogic : IWidgetDelegate
public class CncServerCreationLogic
{
Widget panel;
Action onCreate;

View File

@@ -10,22 +10,22 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
public class CncSettingsLogic : IWidgetDelegate
public class CncSettingsLogic
{
enum PanelType
{
General,
Input
}
PanelType Settings = PanelType.General;
ColorRamp playerColor;
Modifiers groupAddModifier;

View File

@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Widgets.Delegates;
using OpenRA.Mods.RA.Widgets.Logic;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
public void AdjustPalette(Dictionary<string, Palette> palettes)
{
palettes["colorpicker"] = new Palette(palettes["colorpicker"],
new PlayerColorRemap(LobbyDelegate.CurrentColorPreview, format));
new PlayerColorRemap(LobbyLogic.CurrentColorPreview, format));
}
}
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -260,9 +260,9 @@
<Compile Include="WaterPaletteRotation.cs" />
<Compile Include="Weapon.cs" />
<Compile Include="Widgets\BuildPaletteWidget.cs" />
<Compile Include="Widgets\Delegates\IngameObserverChromeDelegate.cs" />
<Compile Include="Widgets\Delegates\IngameChromeDelegate.cs" />
<Compile Include="Widgets\Delegates\ReplayBrowserDelegate.cs" />
<Compile Include="Widgets\Logic\IngameObserverChromeLogic.cs" />
<Compile Include="Widgets\Logic\IngameChromeLogic.cs" />
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
<Compile Include="Widgets\MoneyBinWidget.cs" />
<Compile Include="Widgets\OrderButtonWidget.cs" />
<Compile Include="Widgets\PowerBinWidget.cs" />
@@ -277,7 +277,7 @@
<Compile Include="Invulnerable.cs" />
<Compile Include="ReplaceWithActor.cs" />
<Compile Include="StoresOre.cs" />
<Compile Include="Widgets\Delegates\OrderButtonsChromeDelegate.cs" />
<Compile Include="Widgets\Logic\OrderButtonsChromeLogic.cs" />
<Compile Include="RadarColorFromTerrain.cs" />
<Compile Include="EngineerRepair.cs" />
<Compile Include="Activities\RepairBuilding.cs" />
@@ -308,17 +308,17 @@
<Compile Include="ServerTraits\LobbyCommands.cs" />
<Compile Include="Scripting\RASpecialPowers.cs" />
<Compile Include="PaletteFromCurrentTileset.cs" />
<Compile Include="Widgets\Delegates\ConnectionDialogsDelegate.cs" />
<Compile Include="Widgets\Delegates\CreateServerMenuDelegate.cs" />
<Compile Include="Widgets\Delegates\DeveloperModeDelegate.cs" />
<Compile Include="Widgets\Delegates\DiplomacyDelegate.cs" />
<Compile Include="Widgets\Delegates\LobbyDelegate.cs" />
<Compile Include="Widgets\Delegates\MainMenuButtonsDelegate.cs" />
<Compile Include="Widgets\Delegates\MapChooserDelegate.cs" />
<Compile Include="Widgets\Delegates\MusicPlayerDelegate.cs" />
<Compile Include="Widgets\Delegates\PerfDebugDelegate.cs" />
<Compile Include="Widgets\Delegates\ServerBrowserDelegate.cs" />
<Compile Include="Widgets\Delegates\SettingsMenuDelegate.cs" />
<Compile Include="Widgets\Logic\ConnectionDialogsLogic.cs" />
<Compile Include="Widgets\Logic\CreateServerMenuLogic.cs" />
<Compile Include="Widgets\Logic\DeveloperModeLogic.cs" />
<Compile Include="Widgets\Logic\DiplomacyLogic.cs" />
<Compile Include="Widgets\Logic\LobbyLogic.cs" />
<Compile Include="Widgets\Logic\MainMenuButtonsLogic.cs" />
<Compile Include="Widgets\Logic\MapChooserLogic.cs" />
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
<Compile Include="Widgets\Logic\SettingsMenuLogic.cs" />
<Compile Include="TargetableSubmarine.cs" />
<Compile Include="Effects\RallyPoint.cs" />
<Compile Include="AttackMedic.cs" />
@@ -328,7 +328,7 @@
<Compile Include="Buildings\SoundOnDamageTransition.cs" />
<Compile Include="Activities\RAHarvesterDockSequence.cs" />
<Compile Include="Widgets\GameInitInfoWidget.cs" />
<Compile Include="Widgets\Delegates\GameInitDelegate.cs" />
<Compile Include="Widgets\Logic\GameInitLogic.cs" />
<Compile Include="AttackWander.cs" />
<Compile Include="ScaredyCat.cs" />
<Compile Include="Widgets\SidebarButtonWidget.cs" />

View File

@@ -157,7 +157,6 @@ namespace OpenRA.Mods.RA.Widgets
return DoBuildingHotkey(e.KeyName, world);
}
// TODO: BuildPaletteWidget doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (mi.Event != MouseInputEvent.Down)

View File

@@ -9,9 +9,6 @@
#endregion
using OpenRA.Widgets;
using System;
using OpenRA.Mods.RA.Widgets.Delegates;
using System.IO;
namespace OpenRA.Mods.RA.Widgets
{

View File

@@ -11,12 +11,12 @@
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class ConnectionDialogsDelegate : IWidgetDelegate
public class ConnectionDialogsLogic
{
[ObjectCreator.UseCtor]
public ConnectionDialogsDelegate(
public ConnectionDialogsLogic(
[ObjectCreator.Param] Widget widget,
[ObjectCreator.Param] string host,
[ObjectCreator.Param] int port )
@@ -35,10 +35,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
}
}
public class ConnectionFailedDelegate : IWidgetDelegate
public class ConnectionFailedLogic
{
[ObjectCreator.UseCtor]
public ConnectionFailedDelegate(
public ConnectionFailedLogic(
[ObjectCreator.Param] Widget widget,
[ObjectCreator.Param] OrderManager orderManager)
{

View File

@@ -13,12 +13,12 @@ using System.Net;
using OpenRA.Widgets;
using OpenRA.GameRules;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class CreateServerMenuDelegate : IWidgetDelegate
public class CreateServerMenuLogic
{
[ObjectCreator.UseCtor]
public CreateServerMenuDelegate( [ObjectCreator.Param( "widget" )] Widget cs )
public CreateServerMenuLogic( [ObjectCreator.Param( "widget" )] Widget cs )
{
var settings = Game.Settings;

View File

@@ -23,12 +23,12 @@ using OpenRA;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class DeveloperModeDelegate : IWidgetDelegate
public class DeveloperModeLogic
{
[ObjectCreator.UseCtor]
public DeveloperModeDelegate( [ObjectCreator.Param] World world )
public DeveloperModeLogic( [ObjectCreator.Param] World world )
{
var devmodeBG = Widget.RootWidget.GetWidget("INGAME_ROOT").GetWidget("DEVELOPERMODE_BG");
var devModeButton = Widget.RootWidget.GetWidget<ButtonWidget>("INGAME_DEVELOPERMODE_BUTTON");

View File

@@ -15,9 +15,9 @@ using System.Linq;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class DiplomacyDelegate : IWidgetDelegate
public class DiplomacyLogic
{
static List<Widget> controls = new List<Widget>();
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
readonly World world;
[ObjectCreator.UseCtor]
public DiplomacyDelegate( [ObjectCreator.Param] World world )
public DiplomacyLogic( [ObjectCreator.Param] World world )
{
this.world = world;
var root = Widget.RootWidget.GetWidget("INGAME_ROOT");

View File

@@ -17,21 +17,19 @@ using OpenRA.FileFormats;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class GameInitDelegate : IWidgetDelegateEx
public class GameInitLogic : ILogicWithInit
{
GameInitInfoWidget Info;
[ObjectCreator.UseCtor]
public GameInitDelegate([ObjectCreator.Param] Widget widget)
public GameInitLogic([ObjectCreator.Param] Widget widget)
{
Info = (widget as GameInitInfoWidget);
}
public void Init()
{
if (Info.InstallMode != "cnc")
void ILogicWithInit.Init()
{
Game.ConnectionStateChanged += orderManager =>
{
@@ -59,7 +57,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
break;
}
};
}
TestAndContinue();
}
@@ -76,7 +74,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
}
else
{
MainMenuButtonsDelegate.DisplayModSelector();
MainMenuButtonsLogic.DisplayModSelector();
ShowInstallMethodDialog();
}
}

View File

@@ -11,12 +11,12 @@
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class IngameChromeDelegate : IWidgetDelegate
public class IngameChromeLogic
{
[ObjectCreator.UseCtor]
public IngameChromeDelegate( [ObjectCreator.Param] World world )
public IngameChromeLogic( [ObjectCreator.Param] World world )
{
var r = Widget.RootWidget;
var gameRoot = r.GetWidget("INGAME_ROOT");

View File

@@ -11,12 +11,12 @@
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class IngameObserverChromeDelegate : IWidgetDelegate
public class IngameObserverChromeLogic
{
[ObjectCreator.UseCtor]
public IngameObserverChromeDelegate([ObjectCreator.Param] World world)
public IngameObserverChromeLogic([ObjectCreator.Param] World world)
{
var r = Widget.RootWidget;
var gameRoot = r.GetWidget("OBSERVER_ROOT");

View File

@@ -13,14 +13,14 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
using OpenRA.Graphics;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class LobbyDelegate : IWidgetDelegate
public class LobbyLogic
{
Widget LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost;
ScrollPanelWidget Players;
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
readonly OrderManager orderManager;
readonly WorldRenderer worldRenderer;
[ObjectCreator.UseCtor]
internal LobbyDelegate( [ObjectCreator.Param( "widget" )] Widget lobby, [ObjectCreator.Param] OrderManager orderManager, [ObjectCreator.Param] WorldRenderer worldRenderer)
internal LobbyLogic( [ObjectCreator.Param( "widget" )] Widget lobby, [ObjectCreator.Param] OrderManager orderManager, [ObjectCreator.Param] WorldRenderer worldRenderer)
{
this.orderManager = orderManager;
this.worldRenderer = worldRenderer;

View File

@@ -17,12 +17,12 @@ using System;
using System.Drawing;
using System.Linq;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class MainMenuButtonsDelegate : IWidgetDelegate
public class MainMenuButtonsLogic
{
[ObjectCreator.UseCtor]
public MainMenuButtonsDelegate([ObjectCreator.Param] Widget widget)
public MainMenuButtonsLogic([ObjectCreator.Param] Widget widget)
{
Game.modData.WidgetLoader.LoadWidget( new WidgetArgs(), Widget.RootWidget, "PERF_BG" );
widget.GetWidget("MAINMENU_BUTTON_JOIN").OnMouseUp = mi => { Widget.OpenWindow("JOINSERVER_BG"); return true; };

View File

@@ -15,16 +15,16 @@ using OpenRA.Network;
using OpenRA.Widgets;
using System.IO;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class MapChooserDelegate : IWidgetDelegate
public class MapChooserLogic
{
Map Map = null;
Widget scrollpanel;
ScrollItemWidget itemTemplate;
[ObjectCreator.UseCtor]
internal MapChooserDelegate(
internal MapChooserLogic(
[ObjectCreator.Param( "widget" )] Widget bg,
[ObjectCreator.Param] OrderManager orderManager,
[ObjectCreator.Param] string mapName )

View File

@@ -14,12 +14,12 @@ using OpenRA.FileFormats;
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class MusicPlayerDelegate : IWidgetDelegate
public class MusicPlayerLogic
{
string CurrentSong = null;
public MusicPlayerDelegate()
public MusicPlayerLogic()
{
var bg = Widget.RootWidget.GetWidget("MUSIC_MENU");
CurrentSong = GetNextSong();

View File

@@ -12,12 +12,12 @@ using OpenRA;
using OpenRA.Mods.RA.Orders;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class OrderButtonsChromeDelegate : IWidgetDelegate
public class OrderButtonsChromeLogic
{
[ObjectCreator.UseCtor]
public OrderButtonsChromeDelegate( [ObjectCreator.Param] World world )
public OrderButtonsChromeLogic( [ObjectCreator.Param] World world )
{
var r = Widget.RootWidget;
var gameRoot = r.GetWidget("INGAME_ROOT");

View File

@@ -11,11 +11,11 @@
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class PerfDebugDelegate : IWidgetDelegate
public class PerfDebugLogic
{
public PerfDebugDelegate()
public PerfDebugLogic()
{
var r = Widget.RootWidget;
var perfRoot = r.GetWidget("PERF_BG");

View File

@@ -16,14 +16,14 @@ using OpenRA.FileFormats;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class ReplayBrowserDelegate : IWidgetDelegate
public class ReplayBrowserLogic
{
Widget widget;
[ObjectCreator.UseCtor]
public ReplayBrowserDelegate( [ObjectCreator.Param] Widget widget )
public ReplayBrowserLogic( [ObjectCreator.Param] Widget widget )
{
this.widget = widget;

View File

@@ -12,12 +12,11 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Network;
using OpenRA.Server;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class ServerBrowserDelegate : IWidgetDelegate
public class ServerBrowserLogic
{
static List<Widget> GameButtons = new List<Widget>();
@@ -25,7 +24,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
ScrollItemWidget ServerTemplate;
[ObjectCreator.UseCtor]
public ServerBrowserDelegate( [ObjectCreator.Param] Widget widget )
public ServerBrowserLogic( [ObjectCreator.Param] Widget widget )
{
var bg = widget.GetWidget("JOINSERVER_BG");
@@ -170,10 +169,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
}
public class DirectConnectDelegate : IWidgetDelegate
public class DirectConnectLogic
{
[ObjectCreator.UseCtor]
public DirectConnectDelegate( [ObjectCreator.Param] Widget widget )
public DirectConnectLogic( [ObjectCreator.Param] Widget widget )
{
var dc = widget.GetWidget("DIRECTCONNECT_BG");

View File

@@ -13,12 +13,12 @@ using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Delegates
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class SettingsMenuDelegate : IWidgetDelegate
public class SettingsMenuLogic
{
Widget bg;
public SettingsMenuDelegate()
public SettingsMenuLogic()
{
bg = Widget.RootWidget.GetWidget<BackgroundWidget>("SETTINGS_MENU");
var tabs = bg.GetWidget<ContainerWidget>("TAB_CONTAINER");

View File

@@ -7,6 +7,7 @@
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Linq;
@@ -84,7 +85,6 @@ namespace OpenRA.Mods.RA.Widgets
return CursorProvider.HasCursorSequence(cursor+"-minimap") ? cursor+"-minimap" : cursor;
}
// TODO: RadarBinWidget doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (!hasRadar || radarAnimating) return false; // we're not set up for this.

View File

@@ -11,7 +11,6 @@ using System;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
@@ -85,7 +84,6 @@ namespace OpenRA.Mods.RA.Widgets
return CursorProvider.HasCursorSequence(cursor+"-minimap") ? cursor+"-minimap" : cursor;
}
// TODO: RadarWidget doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (!hasRadar || Animating) return false;

View File

@@ -54,7 +54,6 @@ namespace OpenRA.Mods.RA.Widgets
get { return buttons.Any() ? buttons.Select(b => b.First).Aggregate(Rectangle.Union) : Bounds; }
}
// TODO: SpecialPowerBin doesn't support delegate methods for mouse input
public override bool HandleMouseInput(MouseInput mi)
{
if (mi.Event == MouseInputEvent.Down)

View File

@@ -1,6 +1,6 @@
Container@CHEATS_PANEL:
Id:CHEATS_PANEL
Delegate:CncCheatsLogic
Logic:CncCheatsLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 110)/2
Width:590

View File

@@ -1,6 +1,6 @@
Container@CONNECTING_PANEL:
Id:CONNECTING_PANEL
Delegate:CncConnectingLogic
Logic:CncConnectingLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 90)/2
Width:370
@@ -36,7 +36,7 @@ Container@CONNECTING_PANEL:
Container@CONNECTIONFAILED_PANEL:
Id:CONNECTIONFAILED_PANEL
Delegate:CncConnectionFailedLogic
Logic:CncConnectionFailedLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 90)/2
Width:370

View File

@@ -3,7 +3,7 @@
# TODO: Have the advertise checkbox en/disable the external port textfield
Container@CREATESERVER_PANEL:
Id:CREATESERVER_PANEL
Delegate:CncServerCreationLogic
Logic:CncServerCreationLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 260)/2
Width:604

View File

@@ -1,6 +1,6 @@
Container@DIPLOMACY_PANEL:
Id:DIPLOMACY_PANEL
Delegate:CncDiplomacyLogic
Logic:CncDiplomacyLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 400)/2
Width:450

View File

@@ -1,6 +1,6 @@
Container@DIRECTCONNECT_PANEL:
Id:DIRECTCONNECT_PANEL
Delegate:CncDirectConnectLogic
Logic:CncDirectConnectLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 90)/2
Width:370

View File

@@ -1,6 +1,6 @@
Background@COLOR_CHOOSER:
Id:COLOR_CHOOSER
Delegate:CncColorPickerLogic
Logic:CncColorPickerLogic
Background:panel-black
Width:315
Height:130

View File

@@ -1,6 +1,6 @@
Container@INGAME_ROOT:
Id:INGAME_ROOT
Delegate:CncIngameChromeLogic
Logic:CncIngameChromeLogic
Children:
WorldInteractionController:
Id:INTERACTION_CONTROLLER
@@ -57,7 +57,7 @@ Container@INGAME_ROOT:
UseContrast: yes
Container@PERFORMANCE_INFO:
Id:PERFORMANCE_INFO
Delegate:CncPerfDebugLogic
Logic:CncPerfDebugLogic
Children:
Label@PERF_TEXT:
Id:PERF_TEXT
@@ -123,7 +123,7 @@ Container@INGAME_ROOT:
Children:
OrderButton@SELL:
Id:SELL
Delegate:OrderButtonsChromeDelegate
Logic:OrderButtonsChromeLogic
X:39
Y:0
Width:30
@@ -133,7 +133,7 @@ Container@INGAME_ROOT:
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
OrderButton@REPAIR:
Id:REPAIR
Delegate:OrderButtonsChromeDelegate
Logic:OrderButtonsChromeLogic
X:75
Y:0
Width:30

View File

@@ -2,7 +2,7 @@ Container@INGAME_MENU:
Id:INGAME_MENU
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Delegate:CncIngameMenuLogic
Logic:CncIngameMenuLogic
Children:
Image@RETICLE:
X:(WINDOW_RIGHT-WIDTH)/2

View File

@@ -27,7 +27,7 @@ Container@INSTALL_BACKGROUND:
Container@INSTALL_PANEL:
Id:INSTALL_PANEL
Delegate:CncInstallLogic
Logic:CncInstallLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 150)/2
Width:640
@@ -95,7 +95,7 @@ Container@INSTALL_PANEL:
Container@INSTALL_FROMCD_PANEL:
Id:INSTALL_FROMCD_PANEL
Delegate:CncInstallFromCDLogic
Logic:CncInstallFromCDLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 150)/2
Width:640
@@ -148,7 +148,7 @@ Container@INSTALL_FROMCD_PANEL:
Container@INSTALL_DOWNLOAD_PANEL:
Id:INSTALL_DOWNLOAD_PANEL
Delegate:CncDownloadPackagesLogic
Logic:CncDownloadPackagesLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 150)/2
Width:640

View File

@@ -1,6 +1,6 @@
Container@SERVER_LOBBY:
Id:SERVER_LOBBY
Delegate:CncLobbyLogic
Logic:CncLobbyLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 500)/2
Width:740

View File

@@ -2,7 +2,7 @@ Container@MENU_BACKGROUND:
Id:MENU_BACKGROUND
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Delegate:CncMenuLogic
Logic:CncMenuLogic
Children:
Image@RETICLE:
X:(WINDOW_RIGHT-WIDTH)/2
@@ -176,7 +176,7 @@ Container@MENU_BACKGROUND:
Text:Back
Container@PERFORMANCE_INFO:
Id:PERFORMANCE_INFO
Delegate:CncPerfDebugLogic
Logic:CncPerfDebugLogic
Children:
Label@PERF_TEXT:
Id:PERF_TEXT

View File

@@ -1,6 +1,6 @@
Container@MAPCHOOSER_PANEL:
Id:MAPCHOOSER_PANEL
Delegate:CncMapChooserLogic
Logic:CncMapChooserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 500)/2
Width:740

View File

@@ -1,6 +1,6 @@
Container@MODS_PANEL:
Id:MODS_PANEL
Delegate:CncModBrowserLogic
Logic:CncModBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 500)/2
Width:740

View File

@@ -1,6 +1,6 @@
Container@MUSIC_PANEL:
Id:MUSIC_PANEL
Delegate:CncMusicPlayerLogic
Logic:CncMusicPlayerLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 400)/2
Width:360
@@ -201,7 +201,7 @@ Container@MUSIC_PANEL:
Container@INSTALL_MUSIC_PANEL:
Id:INSTALL_MUSIC_PANEL
Delegate:CncInstallMusicLogic
Logic:CncInstallMusicLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 150)/2
Width:640

View File

@@ -1,6 +1,6 @@
Container@SETTINGS_PANEL:
Id:SETTINGS_PANEL
Delegate:CncSettingsLogic
Logic:CncSettingsLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 250)/2
Width:740

View File

@@ -1,6 +1,6 @@
Container@REPLAYBROWSER_PANEL:
Id:REPLAYBROWSER_PANEL
Delegate:CncReplayBrowserLogic
Logic:CncReplayBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 300)/2
Width:520

View File

@@ -1,6 +1,6 @@
Container@SERVERBROWSER_PANEL:
Id:SERVERBROWSER_PANEL
Delegate:CncServerBrowserLogic
Logic:CncServerBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - 500)/2
Width:740

View File

@@ -5,7 +5,7 @@ GameInitInfo@INIT_SETUP:
PackageURL:http://open-ra.org/get-dependency.php?file=ra-packages
PackagePath:^/Content/ra
InstallMode:ra
Delegate:GameInitDelegate
Logic:GameInitLogic
Background@INIT_CHOOSEINSTALL:
Id:INIT_CHOOSEINSTALL

View File

@@ -1,6 +1,6 @@
Background@SERVER_LOBBY:
Id:SERVER_LOBBY
Delegate:LobbyDelegate
Logic:LobbyLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:800
@@ -431,7 +431,7 @@ Background@MAP_CHOOSER:
Id:MAP_CHOOSER
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Delegate:MapChooserDelegate
Logic:MapChooserLogic
Width:800
Height:600
Children:

View File

@@ -1,6 +1,6 @@
Container@INGAME_ROOT:
Id:INGAME_ROOT
Delegate:IngameChromeDelegate
Logic:IngameChromeLogic
Children:
WorldInteractionController:
Id:INTERACTION_CONTROLLER
@@ -93,7 +93,7 @@ Container@INGAME_ROOT:
Children:
OrderButton@SELL:
Id:SELL
Delegate:OrderButtonsChromeDelegate
Logic:OrderButtonsChromeLogic
X:3
Y:0
Width:30
@@ -103,7 +103,7 @@ Container@INGAME_ROOT:
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
OrderButton@POWER_DOWN:
Id:POWER_DOWN
Delegate:OrderButtonsChromeDelegate
Logic:OrderButtonsChromeLogic
X:39
Y:0
Width:30
@@ -113,7 +113,7 @@ Container@INGAME_ROOT:
LongDesc:Disable unneeded structures so their \npower can be used elsewhere
OrderButton@REPAIR:
Id:REPAIR
Delegate:OrderButtonsChromeDelegate
Logic:OrderButtonsChromeLogic
X:75
Y:0
Width:30
@@ -189,7 +189,7 @@ Container@INGAME_ROOT:
Font:Bold
Background@DIPLOMACY_BG:
Id:DIPLOMACY_BG
Delegate:DiplomacyDelegate
Logic:DiplomacyLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
@@ -223,7 +223,7 @@ Container@INGAME_ROOT:
UseContrast: yes
Background@DEVELOPERMODE_BG:
Id:DEVELOPERMODE_BG
Delegate:DeveloperModeDelegate
Logic:DeveloperModeLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:350
@@ -305,7 +305,7 @@ Container@INGAME_ROOT:
ClickThrough:true
Id:PERF_BG
Background:dialog4
Delegate:PerfDebugDelegate
Logic:PerfDebugLogic
X:10
Y:WINDOW_BOTTOM - 250
Width: 210
@@ -326,7 +326,7 @@ Container@INGAME_ROOT:
Container@OBSERVER_ROOT:
Id:OBSERVER_ROOT
Visible:true
Delegate:IngameObserverChromeDelegate
Logic:IngameObserverChromeLogic
Children:
WorldInteractionController:
X:0
@@ -455,7 +455,7 @@ Container@OBSERVER_ROOT:
ClickThrough:true
Id:PERF_BG
Background:dialog4
Delegate:PerfDebugDelegate
Logic:PerfDebugLogic
X:10
Y:WINDOW_BOTTOM - 250
Width: 210

View File

@@ -5,7 +5,7 @@ Background@MAINMENU_BG:
Width:250
Height:330
Visible:true
Delegate:MainMenuButtonsDelegate
Logic:MainMenuButtonsLogic
Children:
Label@MAINMENU_LABEL_TITLE:
Id:MAINMENU_LABEL_TITLE
@@ -99,7 +99,7 @@ Background@PERF_BG:
ClickThrough:true
Id:PERF_BG
Background:dialog4
Delegate:PerfDebugDelegate
Logic:PerfDebugLogic
X:10
Y:WINDOW_BOTTOM - 250
Width: 210
@@ -119,7 +119,7 @@ Background@PERF_BG:
Height:40
Background@MUSIC_MENU:
Id:MUSIC_MENU
Delegate:MusicPlayerDelegate
Logic:MusicPlayerLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width: 450

View File

@@ -1,6 +1,6 @@
Background@REPLAYBROWSER_BG:
Id:REPLAYBROWSER_BG
Delegate:ReplayBrowserDelegate
Logic:ReplayBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700

View File

@@ -1,6 +1,6 @@
Background@CREATESERVER_BG:
Id:CREATESERVER_BG
Delegate:CreateServerMenuDelegate
Logic:CreateServerMenuLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
@@ -87,7 +87,7 @@ Background@CREATESERVER_BG:
Font:Bold
Background@JOINSERVER_BG:
Id:JOINSERVER_BG
Delegate:ServerBrowserDelegate
Logic:ServerBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700
@@ -242,7 +242,7 @@ Background@JOINSERVER_BG:
Font:Bold
Background@DIRECTCONNECT_BG:
Id:DIRECTCONNECT_BG
Delegate:DirectConnectDelegate
Logic:DirectConnectLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
@@ -290,7 +290,7 @@ Background@DIRECTCONNECT_BG:
Font:Bold
Background@CONNECTION_FAILED_BG:
Id:CONNECTION_FAILED_BG
Delegate:ConnectionFailedDelegate
Logic:ConnectionFailedLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
@@ -331,7 +331,7 @@ Background@CONNECTION_FAILED_BG:
Font:Bold
Background@CONNECTING_BG:
Id:CONNECTING_BG
Delegate:ConnectionDialogsDelegate
Logic:ConnectionDialogsLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450

View File

@@ -1,6 +1,6 @@
Background@SETTINGS_MENU:
Id:SETTINGS_MENU
Delegate:SettingsMenuDelegate
Logic:SettingsMenuLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM- HEIGHT)/2
Width: 450