Move common widgets from Game to Mods.Common.
This commit is contained in:
@@ -260,5 +260,10 @@ namespace OpenRA.Graphics
|
||||
if (fontSheetBuilder != null)
|
||||
fontSheetBuilder.Dispose();
|
||||
}
|
||||
|
||||
public string GetClipboardText()
|
||||
{
|
||||
return Device.GetClipboardText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,38 +172,11 @@
|
||||
<Compile Include="Traits\World\ResourceType.cs" />
|
||||
<Compile Include="Traits\World\ScreenShaker.cs" />
|
||||
<Compile Include="Traits\World\Shroud.cs" />
|
||||
<Compile Include="Widgets\BackgroundWidget.cs" />
|
||||
<Compile Include="Widgets\ButtonWidget.cs" />
|
||||
<Compile Include="Widgets\ChatDisplayWidget.cs" />
|
||||
<Compile Include="Widgets\CheckboxWidget.cs" />
|
||||
<Compile Include="Widgets\ChromeMetrics.cs" />
|
||||
<Compile Include="Widgets\ColorBlockWidget.cs" />
|
||||
<Compile Include="Widgets\DropDownButtonWidget.cs" />
|
||||
<Compile Include="Widgets\GridLayout.cs" />
|
||||
<Compile Include="Widgets\ImageWidget.cs" />
|
||||
<Compile Include="Widgets\LabelWidget.cs" />
|
||||
<Compile Include="Widgets\LineGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ListLayout.cs" />
|
||||
<Compile Include="Widgets\MapPreviewWidget.cs" />
|
||||
<Compile Include="Widgets\PasswordFieldWidget.cs" />
|
||||
<Compile Include="Widgets\PerfGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ProgressBarWidget.cs" />
|
||||
<Compile Include="Widgets\ScrollItemWidget.cs" />
|
||||
<Compile Include="Widgets\ScrollPanelWidget.cs" />
|
||||
<Compile Include="Widgets\SliderWidget.cs" />
|
||||
<Compile Include="Widgets\TextFieldWidget.cs" />
|
||||
<Compile Include="Widgets\VqaPlayerWidget.cs" />
|
||||
<Compile Include="Widgets\Widget.cs" />
|
||||
<Compile Include="Widgets\WidgetLoader.cs" />
|
||||
<Compile Include="Widgets\WidgetUtils.cs" />
|
||||
<Compile Include="Widgets\WorldInteractionControllerWidget.cs" />
|
||||
<Compile Include="World.cs" />
|
||||
<Compile Include="WorldUtils.cs" />
|
||||
<Compile Include="Network\ReplayRecorderConnection.cs" />
|
||||
<Compile Include="Widgets\TooltipContainerWidget.cs" />
|
||||
<Compile Include="Traits\DebugPauseState.cs" />
|
||||
<Compile Include="Network\UPnP.cs" />
|
||||
<Compile Include="Widgets\ClientTooltipRegionWidget.cs" />
|
||||
<Compile Include="Graphics\Renderable.cs" />
|
||||
<Compile Include="Graphics\Voxel.cs" />
|
||||
<Compile Include="Graphics\VoxelRenderer.cs" />
|
||||
@@ -211,16 +184,12 @@
|
||||
<Compile Include="Graphics\VoxelProvider.cs" />
|
||||
<Compile Include="Traits\BodyOrientation.cs" />
|
||||
<Compile Include="Graphics\VoxelAnimation.cs" />
|
||||
<Compile Include="Widgets\ViewportControllerWidget.cs" />
|
||||
<Compile Include="Traits\Player\FrozenActorLayer.cs" />
|
||||
<Compile Include="Graphics\Theater.cs" />
|
||||
<Compile Include="Traits\Player\PlayerColorPalette.cs" />
|
||||
<Compile Include="Traits\Player\PlayerHighlightPalette.cs" />
|
||||
<Compile Include="Traits\World\ScreenMap.cs" />
|
||||
<Compile Include="Traits\World\ActorMap.cs" />
|
||||
<Compile Include="Widgets\HotkeyEntryWidget.cs" />
|
||||
<Compile Include="Widgets\SpriteWidget.cs" />
|
||||
<Compile Include="Widgets\RGBASpriteWidget.cs" />
|
||||
<Compile Include="Scripting\ScriptContext.cs" />
|
||||
<Compile Include="Scripting\ScriptActorInterface.cs" />
|
||||
<Compile Include="Scripting\ScriptObjectWrapper.cs" />
|
||||
@@ -236,7 +205,6 @@
|
||||
<Compile Include="GameRules\RulesetCache.cs" />
|
||||
<Compile Include="Support\MersenneTwister.cs" />
|
||||
<Compile Include="GameInformation.cs" />
|
||||
<Compile Include="Widgets\RootWidget.cs" />
|
||||
<Compile Include="Map\CellLayer.cs" />
|
||||
<Compile Include="Map\CellRegion.cs" />
|
||||
<Compile Include="Input\IInputHandler.cs" />
|
||||
@@ -259,6 +227,12 @@
|
||||
<Compile Include="Support\PerfItem.cs" />
|
||||
<Compile Include="Support\PerfSample.cs" />
|
||||
<Compile Include="Graphics\SpriteRenderable.cs" />
|
||||
<Compile Include="Widgets\Widget.cs" />
|
||||
<Compile Include="Widgets\RootWidget.cs" />
|
||||
<Compile Include="Widgets\WidgetLoader.cs" />
|
||||
<Compile Include="Widgets\ChromeMetrics.cs" />
|
||||
<Compile Include="Widgets\WidgetUtils.cs" />
|
||||
<Compile Include="Widgets\WorldInteractionControllerWidget.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Widgets;
|
||||
using OpenRA.Mods.Common.Widgets.Logic;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
|
||||
@@ -590,6 +590,32 @@
|
||||
<Compile Include="Widgets\Logic\ReplayUtils.cs" />
|
||||
<Compile Include="InstallUtils.cs" />
|
||||
<Compile Include="Graphics\DefaultSpriteSequence.cs" />
|
||||
<Compile Include="Widgets\BackgroundWidget.cs" />
|
||||
<Compile Include="Widgets\ButtonWidget.cs" />
|
||||
<Compile Include="Widgets\ChatDisplayWidget.cs" />
|
||||
<Compile Include="Widgets\CheckboxWidget.cs" />
|
||||
<Compile Include="Widgets\ClientTooltipRegionWidget.cs" />
|
||||
<Compile Include="Widgets\ColorBlockWidget.cs" />
|
||||
<Compile Include="Widgets\DropDownButtonWidget.cs" />
|
||||
<Compile Include="Widgets\GridLayout.cs" />
|
||||
<Compile Include="Widgets\HotkeyEntryWidget.cs" />
|
||||
<Compile Include="Widgets\ImageWidget.cs" />
|
||||
<Compile Include="Widgets\LabelWidget.cs" />
|
||||
<Compile Include="Widgets\LineGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ListLayout.cs" />
|
||||
<Compile Include="Widgets\MapPreviewWidget.cs" />
|
||||
<Compile Include="Widgets\PasswordFieldWidget.cs" />
|
||||
<Compile Include="Widgets\PerfGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ProgressBarWidget.cs" />
|
||||
<Compile Include="Widgets\RGBASpriteWidget.cs" />
|
||||
<Compile Include="Widgets\ScrollItemWidget.cs" />
|
||||
<Compile Include="Widgets\ScrollPanelWidget.cs" />
|
||||
<Compile Include="Widgets\SliderWidget.cs" />
|
||||
<Compile Include="Widgets\SpriteWidget.cs" />
|
||||
<Compile Include="Widgets\TextFieldWidget.cs" />
|
||||
<Compile Include="Widgets\TooltipContainerWidget.cs" />
|
||||
<Compile Include="Widgets\ViewportControllerWidget.cs" />
|
||||
<Compile Include="Widgets\VqaPlayerWidget.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Mods.Common.Widgets;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Scripting
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class BackgroundWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ButtonWidget : Widget
|
||||
{
|
||||
@@ -12,8 +12,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ChatDisplayWidget : Widget
|
||||
{
|
||||
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class CheckboxWidget : ButtonWidget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ClientTooltipRegionWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ColorBlockWidget : Widget
|
||||
{
|
||||
@@ -12,8 +12,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class DropDownButtonWidget : ButtonWidget
|
||||
{
|
||||
@@ -9,8 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class GridLayout : ILayout
|
||||
{
|
||||
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class HotkeyEntryWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ImageWidget : Widget
|
||||
{
|
||||
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public enum TextAlign { Left, Center, Right }
|
||||
public enum TextVAlign { Top, Middle, Bottom }
|
||||
@@ -12,8 +12,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class LineGraphWidget : Widget
|
||||
{
|
||||
@@ -8,7 +8,9 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ListLayout : ILayout
|
||||
{
|
||||
@@ -14,8 +14,9 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class SpawnOccupant
|
||||
{
|
||||
@@ -8,7 +8,9 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class PasswordFieldWidget : TextFieldWidget
|
||||
{
|
||||
@@ -11,8 +11,9 @@
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Support;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class PerfGraphWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ProgressBarWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class RGBASpriteWidget : Widget
|
||||
{
|
||||
@@ -9,8 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class ScrollItemWidget : ButtonWidget
|
||||
{
|
||||
@@ -13,8 +13,9 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public interface ILayout
|
||||
{
|
||||
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class SliderWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class SpriteWidget : Widget
|
||||
{
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class TextFieldWidget : Widget
|
||||
{
|
||||
@@ -177,7 +178,7 @@ namespace OpenRA.Widgets
|
||||
((Platform.CurrentPlatform != PlatformType.OSX && e.Modifiers.HasModifier(Modifiers.Ctrl)) ||
|
||||
(Platform.CurrentPlatform == PlatformType.OSX && e.Modifiers.HasModifier(Modifiers.Meta))))
|
||||
{
|
||||
var clipboardText = Game.Renderer.Device.GetClipboardText();
|
||||
var clipboardText = Game.Renderer.GetClipboardText();
|
||||
|
||||
// Take only the first line of the clipboard contents
|
||||
var nl = clipboardText.IndexOf('\n');
|
||||
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class TooltipContainerWidget : Widget
|
||||
{
|
||||
@@ -14,8 +14,9 @@ using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Orders;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public enum WorldTooltipType { None, Unexplored, Actor, FrozenActor }
|
||||
|
||||
@@ -13,8 +13,9 @@ using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.FileSystem;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class VqaPlayerWidget : Widget
|
||||
{
|
||||
Reference in New Issue
Block a user