move widget code to commons

This commit is contained in:
Matthias Mailänder
2015-02-28 13:29:39 +01:00
parent cee3d6cf9e
commit ff6dbde8d7
38 changed files with 80 additions and 98 deletions

View File

@@ -475,6 +475,7 @@
<Compile Include="Warheads\HealthPercentageDamageWarhead.cs" />
<Compile Include="Warheads\LeaveSmudgeWarhead.cs" />
<Compile Include="Warheads\SpreadDamageWarhead.cs" />
<Compile Include="Widgets\ActorPreviewWidget.cs" />
<Compile Include="Widgets\ColorMixerWidget.cs" />
<Compile Include="Widgets\ColorPreviewManagerWidget.cs" />
<Compile Include="Widgets\ConfirmationDialogs.cs" />
@@ -487,29 +488,61 @@
<Compile Include="Widgets\Logic\ColorPickerLogic.cs" />
<Compile Include="Widgets\Logic\ConnectionLogic.cs" />
<Compile Include="Widgets\Logic\CountryTooltipLogic.cs" />
<Compile Include="Widgets\Logic\CreditsLogic.cs" />
<Compile Include="Widgets\Logic\DirectConnectLogic.cs" />
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\AddRaceSuffixLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ControlGroupLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\DebugMenuLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\DiplomacyLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoBriefingLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoObjectivesLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoStatsLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameTimerLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameChatLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameCashCounterLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameMenuLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngamePowerBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngamePowerCounterLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameSiloBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameRadarDisplayLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LeaveMapLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LoadIngamePlayerOrObserverUILogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ObserverShroudSelectorLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ObserverStatsLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\OrderButtonsChromeLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ProductionTooltipLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ReplayControlBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\SupportPowerBinLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\SupportPowerTooltipLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\WorldTooltipLogic.cs" />
<Compile Include="Widgets\Logic\Installation\InstallFromCDLogic.cs" />
<Compile Include="Widgets\Logic\Installation\DownloadPackagesLogic.cs" />
<Compile Include="Widgets\Logic\Installation\InstallLogic.cs" />
<Compile Include="Widgets\Logic\Installation\InstallMusicLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\ClientTooltipLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\KickClientLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\KickSpectatorsLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\LobbyLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\LobbyMapPreviewLogic.cs" />
<Compile Include="Widgets\Logic\Lobby\LobbyUtils.cs" />
<Compile Include="Widgets\Logic\Lobby\SpawnSelectorTooltipLogic.cs" />
<Compile Include="Widgets\Logic\MainMenuLogic.cs" />
<Compile Include="Widgets\Logic\MapChooserLogic.cs" />
<Compile Include="Widgets\Logic\MissionBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ModBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ProductionTooltipLogic.cs" />
<Compile Include="Widgets\Logic\SupportPowerTooltipLogic.cs" />
<Compile Include="Widgets\Logic\SupportPowerBinLogic.cs" />
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
<Compile Include="Widgets\Logic\SettingsLogic.cs" />
<Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" />
<Compile Include="Widgets\Logic\TabCompletionLogic.cs" />
<Compile Include="Widgets\MenuButtonWidget.cs" />
<Compile Include="Widgets\ObserverProductionIconsWidget.cs" />
<Compile Include="Widgets\ObserverSupportPowerIconsWidget.cs" />
<Compile Include="Widgets\ProductionPaletteWidget.cs" />
<Compile Include="Widgets\ProductionTabsWidget.cs" />
@@ -519,13 +552,13 @@
<Compile Include="Widgets\StrategicProgressWidget.cs" />
<Compile Include="Widgets\SupportPowersWidget.cs" />
<Compile Include="Widgets\SupportPowerTimerWidget.cs" />
<Compile Include="Widgets\TerrainTemplatePreviewWidget.cs" />
<Compile Include="Widgets\WorldCommandWidget.cs" />
<Compile Include="SpriteLoaders\ShpTDLoader.cs" />
<Compile Include="SpriteLoaders\ShpTSLoader.cs" />
<Compile Include="SpriteLoaders\TmpRALoader.cs" />
<Compile Include="SpriteLoaders\TmpTDLoader.cs" />
<Compile Include="SpriteLoaders\ShpD2Loader.cs" />
<Compile Include="Widgets\ActorPreviewWidget.cs" />
<Compile Include="Widgets\TerrainTemplatePreviewWidget.cs" />
<Compile Include="LoadScreens\LogoStripeLoadScreen.cs" />
<Compile Include="LoadScreens\BlankLoadScreen.cs" />
<Compile Include="UtilityCommands\CheckYaml.cs" />

View File

@@ -13,7 +13,7 @@ using System;
using OpenRA.FileSystem;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class CreditsLogic
{

View File

@@ -11,7 +11,7 @@
using System;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class AddRaceSuffixLogic
{

View File

@@ -12,11 +12,10 @@ using System;
using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Mods.RA.Widgets;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class ClassicProductionLogic
{

View File

@@ -12,7 +12,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class ControlGroupLogic
{

View File

@@ -10,12 +10,11 @@
using System;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Support;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class DebugMenuLogic
{

View File

@@ -10,12 +10,11 @@
using System;
using System.Linq;
using OpenRA.Mods.Common.Widgets.Logic;
using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class DiplomacyLogic
{

View File

@@ -8,13 +8,9 @@
*/
#endregion
using System;
using System.Linq;
using OpenRA.Mods.RA;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoBriefingLogic
{

View File

@@ -10,11 +10,10 @@
using System;
using System.Linq;
using OpenRA.Mods.RA;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public enum IngameInfoPanel { AutoSelect, Map, Objectives, Debug }

View File

@@ -15,11 +15,11 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoObjectivesLogic
{
ContainerWidget template;
readonly ContainerWidget template;
[ObjectCreator.UseCtor]
public GameInfoObjectivesLogic(Widget widget, World world)

View File

@@ -13,7 +13,7 @@ using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoStatsLogic
{

View File

@@ -12,7 +12,7 @@ using System;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class GameTimerLogic
{

View File

@@ -8,11 +8,10 @@
*/
#endregion
using OpenRA.Mods.Common.Widgets;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class IngameCashCounterLogic
{

View File

@@ -11,10 +11,9 @@
using System;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class IngameMenuLogic
{

View File

@@ -10,10 +10,9 @@
using System.Drawing;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class IngamePowerBarLogic
{

View File

@@ -10,10 +10,9 @@
using System.Drawing;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class IngamePowerCounterLogic
{

View File

@@ -9,11 +9,10 @@
#endregion
using System.Drawing;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class IngameSiloBarLogic
{

View File

@@ -17,14 +17,15 @@ using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
namespace OpenRA.Mods.Common.Widgets
{
class LeaveMapLogic
{
readonly OrderManager orderManager;
enum Tab { Objectives, Chat }
Tab currentTab;
OrderManager orderManager;
bool newChatMessage;
[ObjectCreator.UseCtor]

View File

@@ -12,11 +12,10 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class ObserverShroudSelectorLogic
{

View File

@@ -14,14 +14,11 @@ using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Mods.Common.Widgets.Logic;
using OpenRA.Mods.RA.Traits;
using OpenRA.Network;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class ObserverStatsLogic
{

View File

@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class OrderButtonsChromeLogic
{

View File

@@ -12,7 +12,7 @@ using System.Collections.Generic;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class ReplayControlBarLogic
{

View File

@@ -13,7 +13,7 @@ using System.Drawing;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class WorldTooltipLogic
{

View File

@@ -17,7 +17,7 @@ using System.Net;
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class DownloadPackagesLogic
{

View File

@@ -14,16 +14,16 @@ using System.Linq;
using System.Threading;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class InstallFromCDLogic
{
Widget panel;
ProgressBarWidget progressBar;
LabelWidget statusLabel;
Action continueLoading;
ButtonWidget retryButton, backButton;
Widget installingContainer, insertDiskContainer;
readonly Widget panel;
readonly ProgressBarWidget progressBar;
readonly LabelWidget statusLabel;
readonly Action continueLoading;
readonly ButtonWidget retryButton, backButton;
readonly Widget installingContainer, insertDiskContainer;
[ObjectCreator.UseCtor]
public InstallFromCDLogic(Widget widget, Action continueLoading)

View File

@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class InstallLogic : Widget
{

View File

@@ -15,7 +15,7 @@ using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class InstallMusicLogic
{

View File

@@ -12,7 +12,7 @@ using System;
using System.Linq;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class SpawnSelectorTooltipLogic
{

View File

@@ -19,7 +19,7 @@ using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class MissionBrowserLogic
{

View File

@@ -11,11 +11,10 @@
using System;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Mods.Common.Widgets;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class MusicPlayerLogic
{

View File

@@ -11,7 +11,7 @@
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class PerfDebugLogic
{

View File

@@ -11,7 +11,7 @@
using System;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class SimpleTooltipLogic
{

View File

@@ -16,7 +16,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
namespace OpenRA.Mods.Common.Widgets
{
public class ObserverProductionIconsWidget : Widget
{

View File

@@ -13,12 +13,11 @@ using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Orders;
using OpenRA.Primitives;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
namespace OpenRA.Mods.Common.Widgets
{
public class WorldCommandWidget : Widget
{

View File

@@ -99,50 +99,17 @@
<Compile Include="Traits\LeavesHusk.cs" />
<Compile Include="Traits\TargetableSubmarine.cs" />
<Compile Include="Traits\TransformOnPassenger.cs" />
<Compile Include="Widgets\Logic\MissionBrowserLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\DiplomacyLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoBriefingLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoObjectivesLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\GameInfoStatsLogic.cs" />
<Compile Include="Widgets\Logic\IngameMenuLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\LeaveMapLogic.cs" />
<Compile Include="Widgets\Logic\DownloadPackagesLogic.cs" />
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
<Compile Include="Widgets\Logic\ObserverStatsLogic.cs" />
<Compile Include="Widgets\Logic\OrderButtonsChromeLogic.cs" />
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
<Compile Include="Widgets\ObserverProductionIconsWidget.cs" />
<Compile Include="Widgets\WorldCommandWidget.cs" />
<Compile Include="Traits\Render\RenderShroudCircle.cs" />
<Compile Include="Traits\Infiltration\InfiltrateForCash.cs" />
<Compile Include="Traits\Infiltration\InfiltrateForExploration.cs" />
<Compile Include="Traits\Infiltration\InfiltrateForPowerOutage.cs" />
<Compile Include="Traits\Infiltration\InfiltrateForSupportPower.cs" />
<Compile Include="Traits\Infiltration\Infiltrates.cs" />
<Compile Include="Widgets\Logic\ObserverShroudSelectorLogic.cs" />
<Compile Include="Widgets\Logic\SpawnSelectorTooltipLogic.cs" />
<Compile Include="Widgets\Logic\CreditsLogic.cs" />
<Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" />
<Compile Include="Widgets\Logic\WorldTooltipLogic.cs" />
<Compile Include="Widgets\Logic\InstallLogic.cs" />
<Compile Include="CombatDebugOverlay.cs" />
<Compile Include="Widgets\Logic\GameTimerLogic.cs" />
<Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" />
<Compile Include="Traits\Attack\AttackGarrisoned.cs" />
<Compile Include="Widgets\Logic\ControlGroupLogic.cs" />
<Compile Include="Scripting\Properties\ChronosphereProperties.cs" />
<Compile Include="Widgets\Logic\InstallFromCDLogic.cs" />
<Compile Include="Widgets\Logic\InstallMusicLogic.cs" />
<Compile Include="Traits\Buildings\ClonesProducedUnits.cs" />
<Compile Include="Traits\Cloneable.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameCashCounterLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngamePowerCounterLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngamePowerBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\IngameSiloBarLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\AddRaceSuffixLogic.cs" />
<Compile Include="Widgets\Logic\ClassicProductionLogic.cs" />
<Compile Include="Widgets\Logic\DebugMenuLogic.cs" />
<Compile Include="Scripting\Properties\HarvesterProperties.cs" />
<Compile Include="Scripting\Properties\TransportProperties.cs" />
<Compile Include="Traits\InvulnerabilityUpgrade.cs" />