Add a ChromeLogic base class for chrome logic.
This commit is contained in:
@@ -140,6 +140,12 @@ namespace OpenRA.Widgets
|
||||
}
|
||||
}
|
||||
|
||||
public class ChromeLogic : IDisposable
|
||||
{
|
||||
public void Dispose() { Dispose(true); GC.SuppressFinalize(this); }
|
||||
protected virtual void Dispose(bool disposing) { }
|
||||
}
|
||||
|
||||
public abstract class Widget
|
||||
{
|
||||
public readonly List<Widget> Children = new List<Widget>();
|
||||
@@ -151,7 +157,7 @@ namespace OpenRA.Widgets
|
||||
public string Width = "0";
|
||||
public string Height = "0";
|
||||
public string[] Logic = { };
|
||||
public object[] LogicObjects { get; private set; }
|
||||
public ChromeLogic[] LogicObjects { get; private set; }
|
||||
public bool Visible = true;
|
||||
public bool IgnoreMouseOver;
|
||||
public bool IgnoreChildMouseOver;
|
||||
@@ -244,7 +250,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
args["widget"] = this;
|
||||
|
||||
LogicObjects = Logic.Select(l => Game.ModData.ObjectCreator.CreateObject<object>(l, args))
|
||||
LogicObjects = Logic.Select(l => Game.ModData.ObjectCreator.CreateObject<ChromeLogic>(l, args))
|
||||
.ToArray();
|
||||
|
||||
args.Remove("widget");
|
||||
@@ -486,8 +492,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
if (LogicObjects != null)
|
||||
foreach (var l in LogicObjects)
|
||||
if (l is IDisposable)
|
||||
((IDisposable)l).Dispose();
|
||||
l.Dispose();
|
||||
}
|
||||
|
||||
public Widget GetOrNull(string id)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
{
|
||||
public class ProductionTabsLogic
|
||||
public class ProductionTabsLogic : ChromeLogic
|
||||
{
|
||||
readonly ProductionTabsWidget tabs;
|
||||
readonly World world;
|
||||
|
||||
@@ -20,7 +20,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class AssetBrowserLogic
|
||||
public class AssetBrowserLogic : ChromeLogic
|
||||
{
|
||||
static readonly string[] AllowedExtensions = { ".shp", ".r8", "tmp", ".tem", ".des", ".sno", ".int", ".jun", ".vqa" };
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ButtonTooltipLogic
|
||||
public class ButtonTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ButtonTooltipLogic(Widget widget, ButtonWidget button)
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ColorPickerLogic
|
||||
public class ColorPickerLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ColorPickerLogic(Widget widget, World world, HSLColor initialColor, Action<HSLColor> onChange, WorldRenderer worldRenderer)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ConnectionLogic
|
||||
public class ConnectionLogic : ChromeLogic
|
||||
{
|
||||
Action onConnect, onAbort;
|
||||
Action<string> onRetry;
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnectionFailedLogic
|
||||
public class ConnectionFailedLogic : ChromeLogic
|
||||
{
|
||||
PasswordFieldWidget passwordField;
|
||||
bool passwordOffsetAdjusted;
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class CreditsLogic
|
||||
public class CreditsLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public CreditsLogic(Widget widget, Action onExit)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class DirectConnectLogic
|
||||
public class DirectConnectLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public DirectConnectLogic(Widget widget, Action onExit, Action openLobby)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class DisconnectWatcherLogic
|
||||
public class DisconnectWatcherLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public DisconnectWatcherLogic(Widget widget, OrderManager orderManager)
|
||||
|
||||
@@ -23,7 +23,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ActorSelectorLogic
|
||||
public class ActorSelectorLogic : ChromeLogic
|
||||
{
|
||||
readonly EditorViewportControllerWidget editor;
|
||||
readonly DropDownButtonWidget ownersDropDown;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LayerSelectorLogic
|
||||
public class LayerSelectorLogic : ChromeLogic
|
||||
{
|
||||
readonly EditorViewportControllerWidget editor;
|
||||
readonly Ruleset modRules;
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MapEditorLogic
|
||||
public class MapEditorLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public MapEditorLogic(Widget widget, World world, WorldRenderer worldRenderer)
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MapEditorTabsLogic
|
||||
public class MapEditorTabsLogic : ChromeLogic
|
||||
{
|
||||
protected enum MenuType { Tiles, Layers, Actors }
|
||||
protected MenuType menuType = MenuType.Tiles;
|
||||
|
||||
@@ -21,7 +21,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class NewMapLogic
|
||||
public class NewMapLogic : ChromeLogic
|
||||
{
|
||||
Widget panel;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SaveMapLogic
|
||||
public class SaveMapLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SaveMapLogic(Widget widget, Action<string> onSave, Action onExit, Map map, List<MiniYamlNode> playerDefinitions, List<MiniYamlNode> actorDefinitions)
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class TileSelectorLogic
|
||||
public class TileSelectorLogic : ChromeLogic
|
||||
{
|
||||
readonly EditorViewportControllerWidget editor;
|
||||
readonly ScrollPanelWidget panel;
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class FactionTooltipLogic
|
||||
public class FactionTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public FactionTooltipLogic(Widget widget, ButtonWidget button)
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class GlobalChatLogic : IDisposable
|
||||
class GlobalChatLogic : ChromeLogic
|
||||
{
|
||||
readonly ScrollPanelWidget historyPanel;
|
||||
readonly LabelWidget historyTemplate;
|
||||
@@ -149,8 +149,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
|
||||
bool disposed;
|
||||
public void Dispose()
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (disposed)
|
||||
return;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class AddFactionSuffixLogic
|
||||
public class AddFactionSuffixLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public AddFactionSuffixLogic(Widget widget, World world)
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ClassicProductionLogic
|
||||
public class ClassicProductionLogic : ChromeLogic
|
||||
{
|
||||
readonly ProductionPaletteWidget palette;
|
||||
readonly World world;
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ControlGroupLogic
|
||||
public class ControlGroupLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ControlGroupLogic(Widget widget, World world, WorldRenderer worldRenderer)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class DebugMenuLogic
|
||||
public class DebugMenuLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public DebugMenuLogic(Widget widget, World world)
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class DiplomacyLogic
|
||||
public class DiplomacyLogic : ChromeLogic
|
||||
{
|
||||
readonly World world;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class GameInfoBriefingLogic
|
||||
class GameInfoBriefingLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public GameInfoBriefingLogic(Widget widget, World world)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public enum IngameInfoPanel { AutoSelect, Map, Objectives, Debug }
|
||||
|
||||
class GameInfoLogic
|
||||
class GameInfoLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public GameInfoLogic(Widget widget, World world, IngameInfoPanel activePanel)
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class GameInfoObjectivesLogic
|
||||
class GameInfoObjectivesLogic : ChromeLogic
|
||||
{
|
||||
readonly ContainerWidget template;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class GameInfoStatsLogic
|
||||
class GameInfoStatsLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public GameInfoStatsLogic(Widget widget, World world)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class GameTimerLogic
|
||||
public class GameTimerLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public GameTimerLogic(Widget widget, OrderManager orderManager, World world)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngameCashCounterLogic
|
||||
public class IngameCashCounterLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngameCashCounterLogic(Widget widget, World world)
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngameChatLogic
|
||||
public class IngameChatLogic : ChromeLogic
|
||||
{
|
||||
readonly OrderManager orderManager;
|
||||
readonly Ruleset modRules;
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngameMenuLogic
|
||||
public class IngameMenuLogic : ChromeLogic
|
||||
{
|
||||
Widget menu;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngamePowerBarLogic
|
||||
public class IngamePowerBarLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngamePowerBarLogic(Widget widget, World world)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngamePowerCounterLogic
|
||||
public class IngamePowerCounterLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngamePowerCounterLogic(Widget widget, World world)
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngameRadarDisplayLogic
|
||||
public class IngameRadarDisplayLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngameRadarDisplayLogic(Widget widget, World world)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class IngameSiloBarLogic
|
||||
public class IngameSiloBarLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngameSiloBarLogic(Widget widget, World world)
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LoadIngamePerfLogic
|
||||
public class LoadIngamePerfLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public LoadIngamePerfLogic(Widget widget, World world)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LoadIngamePlayerOrObserverUILogic
|
||||
public class LoadIngamePlayerOrObserverUILogic : ChromeLogic
|
||||
{
|
||||
bool loadingObserverWidgets = false;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LoadMapEditorLogic
|
||||
public class LoadMapEditorLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public LoadMapEditorLogic(Widget widget, World world)
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MenuButtonsChromeLogic
|
||||
public class MenuButtonsChromeLogic : ChromeLogic
|
||||
{
|
||||
readonly World world;
|
||||
readonly Widget worldRoot;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ObserverShroudSelectorLogic
|
||||
public class ObserverShroudSelectorLogic : ChromeLogic
|
||||
{
|
||||
readonly CameraOption combined, disableShroud;
|
||||
readonly IOrderedEnumerable<IGrouping<int, CameraOption>> teams;
|
||||
|
||||
@@ -20,7 +20,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ObserverStatsLogic
|
||||
public class ObserverStatsLogic : ChromeLogic
|
||||
{
|
||||
ContainerWidget basicStatsHeaders;
|
||||
ContainerWidget economyStatsHeaders;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SellOrderButtonLogic
|
||||
public class SellOrderButtonLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SellOrderButtonLogic(Widget widget, World world)
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
}
|
||||
|
||||
public class RepairOrderButtonLogic
|
||||
public class RepairOrderButtonLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public RepairOrderButtonLogic(Widget widget, World world)
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
}
|
||||
|
||||
public class PowerdownOrderButtonLogic
|
||||
public class PowerdownOrderButtonLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public PowerdownOrderButtonLogic(Widget widget, World world)
|
||||
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
}
|
||||
|
||||
public class BeaconOrderButtonLogic
|
||||
public class BeaconOrderButtonLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public BeaconOrderButtonLogic(Widget widget, World world)
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ProductionTooltipLogic
|
||||
public class ProductionTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ProductionTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, ProductionPaletteWidget palette, World world)
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ReplayControlBarLogic
|
||||
public class ReplayControlBarLogic : ChromeLogic
|
||||
{
|
||||
enum PlaybackSpeed { Regular, Slow, Fast, Maximum }
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SupportPowerBinLogic
|
||||
public class SupportPowerBinLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SupportPowerBinLogic(Widget widget, World world)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SupportPowerTooltipLogic
|
||||
public class SupportPowerTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SupportPowerTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, SupportPowersWidget palette, World world)
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class WorldTooltipLogic
|
||||
public class WorldTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public WorldTooltipLogic(Widget widget, World world, TooltipContainerWidget tooltipContainer, ViewportControllerWidget viewport)
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class DownloadPackagesLogic
|
||||
public class DownloadPackagesLogic : ChromeLogic
|
||||
{
|
||||
static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
||||
readonly Widget panel;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class InstallFromCDLogic
|
||||
public class InstallFromCDLogic : ChromeLogic
|
||||
{
|
||||
readonly string modId;
|
||||
readonly Widget panel;
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class InstallLogic : Widget
|
||||
public class InstallLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public InstallLogic(Widget widget, string mirrorListUrl, string modId)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class InstallMusicLogic
|
||||
public class InstallMusicLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public InstallMusicLogic(Widget widget, string modId)
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ClientTooltipLogic
|
||||
public class ClientTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ClientTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, OrderManager orderManager, int clientIndex)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class KickClientLogic
|
||||
class KickClientLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public KickClientLogic(Widget widget, string clientName, Action<bool> okPressed, Action cancelPressed)
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class KickSpectatorsLogic
|
||||
class KickSpectatorsLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public KickSpectatorsLogic(Widget widget, string clientCount, Action okPressed, Action cancelPressed)
|
||||
|
||||
@@ -21,7 +21,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LobbyLogic
|
||||
public class LobbyLogic : ChromeLogic
|
||||
{
|
||||
static readonly Action DoNothing = () => { };
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LobbyMapPreviewLogic
|
||||
public class LobbyMapPreviewLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
internal LobbyMapPreviewLogic(Widget widget, OrderManager orderManager, LobbyLogic lobby)
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SpawnSelectorTooltipLogic
|
||||
public class SpawnSelectorTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SpawnSelectorTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, MapPreviewWidget preview)
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MainMenuLogic
|
||||
public class MainMenuLogic : ChromeLogic
|
||||
{
|
||||
protected enum MenuType { Main, Singleplayer, Extras, MapEditor, None }
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MapChooserLogic
|
||||
public class MapChooserLogic : ChromeLogic
|
||||
{
|
||||
readonly Widget widget;
|
||||
readonly DropDownButtonWidget gameModeDropdown;
|
||||
|
||||
@@ -21,7 +21,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MissionBrowserLogic
|
||||
public class MissionBrowserLogic : ChromeLogic
|
||||
{
|
||||
enum PlayingVideo { None, Info, Briefing, GameStart }
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ModBrowserLogic
|
||||
public class ModBrowserLogic : ChromeLogic
|
||||
{
|
||||
readonly Widget modList;
|
||||
readonly ButtonWidget modTemplate;
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class MusicPlayerLogic
|
||||
public class MusicPlayerLogic : ChromeLogic
|
||||
{
|
||||
readonly ScrollPanelWidget musicList;
|
||||
readonly ScrollItemWidget itemTemplate;
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class PerfDebugLogic
|
||||
public class PerfDebugLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public PerfDebugLogic(Widget widget)
|
||||
|
||||
@@ -22,7 +22,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ReplayBrowserLogic
|
||||
public class ReplayBrowserLogic : ChromeLogic
|
||||
{
|
||||
static Filter filter = new Filter();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ServerBrowserLogic
|
||||
public class ServerBrowserLogic : ChromeLogic
|
||||
{
|
||||
static readonly Action DoNothing = () => { };
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ServerCreationLogic
|
||||
public class ServerCreationLogic : ChromeLogic
|
||||
{
|
||||
Widget panel;
|
||||
Action onCreate;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SettingsLogic
|
||||
public class SettingsLogic : ChromeLogic
|
||||
{
|
||||
enum PanelType { Display, Audio, Input, Advanced }
|
||||
Dictionary<PanelType, Action> leavePanelActions = new Dictionary<PanelType, Action>();
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class SimpleTooltipLogic
|
||||
public class SimpleTooltipLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public SimpleTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, Func<string> getText)
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class TabCompletionLogic
|
||||
public class TabCompletionLogic : ChromeLogic
|
||||
{
|
||||
IList<string> candidates = new List<string>();
|
||||
int currentCandidateIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user