Skip to content

Commit 264179f

Browse files
committed
Changes project to PCL
1 parent a5231d6 commit 264179f

File tree

12 files changed

+79
-91
lines changed

12 files changed

+79
-91
lines changed

MonoGame-Textbox/Cursor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public int? SelectedChar
7575
}
7676
}
7777
}
78-
78+
7979
private readonly TextBox textBox;
8080

8181
private int textCursor;

MonoGame-Textbox/MonoGame-Textbox.csproj

Lines changed: 11 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5+
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
67
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
78
<ProjectGuid>{60845196-31B8-487A-8F25-83EAC47DA83D}</ProjectGuid>
89
<OutputType>Library</OutputType>
910
<AppDesignerFolder>Properties</AppDesignerFolder>
1011
<RootNamespace>MonoGame_Textbox</RootNamespace>
1112
<AssemblyName>MonoGame-Textbox</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
14+
<DefaultLanguage>en-US</DefaultLanguage>
1315
<FileAlignment>512</FileAlignment>
14-
<NuGetPackageImportStamp>
15-
</NuGetPackageImportStamp>
16-
<TargetFrameworkProfile />
16+
17+
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
18+
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
19+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1720
</PropertyGroup>
1821
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1922
<DebugSymbols>true</DebugSymbols>
@@ -33,48 +36,14 @@
3336
<WarningLevel>4</WarningLevel>
3437
</PropertyGroup>
3538
<ItemGroup>
36-
<Reference Include="JetBrains.Annotations, Version=10.2.1.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
37-
<HintPath>packages\JetBrains.Annotations.10.2.1\lib\net\JetBrains.Annotations.dll</HintPath>
39+
<Reference Include="JetBrains.Annotations, Version=11.1.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
40+
<HintPath>packages\JetBrains.Annotations.11.1.0\lib\net20\JetBrains.Annotations.dll</HintPath>
3841
<Private>True</Private>
3942
</Reference>
4043
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
41-
<HintPath>packages\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
44+
<HintPath>packages\MonoGame.Framework.Portable.3.6.0.1625\lib\portable-net45+win8+wpa81\MonoGame.Framework.dll</HintPath>
4245
<Private>True</Private>
4346
</Reference>
44-
<Reference Include="SharpDX, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
45-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath>
46-
</Reference>
47-
<Reference Include="SharpDX.Direct2D1, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
48-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct2D1.dll</HintPath>
49-
</Reference>
50-
<Reference Include="SharpDX.Direct3D11, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
51-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct3D11.dll</HintPath>
52-
</Reference>
53-
<Reference Include="SharpDX.Direct3D9, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
54-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct3D9.dll</HintPath>
55-
</Reference>
56-
<Reference Include="SharpDX.DXGI, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
57-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.DXGI.dll</HintPath>
58-
</Reference>
59-
<Reference Include="SharpDX.MediaFoundation, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
60-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.MediaFoundation.dll</HintPath>
61-
</Reference>
62-
<Reference Include="SharpDX.XAudio2, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
63-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.XAudio2.dll</HintPath>
64-
</Reference>
65-
<Reference Include="SharpDX.XInput, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
66-
<HintPath>$(SharpDXPackageBinDir)\SharpDX.XInput.dll</HintPath>
67-
</Reference>
68-
<Reference Include="System" />
69-
<Reference Include="System.Core" />
70-
<Reference Include="System.Drawing" />
71-
<Reference Include="System.Windows.Forms" />
72-
<Reference Include="System.Xml.Linq" />
73-
<Reference Include="System.Data.DataSetExtensions" />
74-
<Reference Include="Microsoft.CSharp" />
75-
<Reference Include="System.Data" />
76-
<Reference Include="System.Net.Http" />
77-
<Reference Include="System.Xml" />
7847
</ItemGroup>
7948
<ItemGroup>
8049
<Compile Include="Cursor.cs" />
@@ -88,14 +57,7 @@
8857
<ItemGroup>
8958
<None Include="packages.config" />
9059
</ItemGroup>
91-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
92-
<Import Project="packages\SharpDX.2.6.3\build\SharpDX.targets" Condition="Exists('packages\SharpDX.2.6.3\build\SharpDX.targets')" />
93-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
94-
<PropertyGroup>
95-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
96-
</PropertyGroup>
97-
<Error Condition="!Exists('packages\SharpDX.2.6.3\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SharpDX.2.6.3\build\SharpDX.targets'))" />
98-
</Target>
60+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
9961
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
10062
Other similar extension points exist, see Microsoft.Common.targets.
10163
<Target Name="BeforeBuild">

MonoGame-Textbox/MonoGame-Textbox.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Global
2828
{D42297D9-5678-4449-BBFF-0424B35F6762}.Debug|x86.ActiveCfg = Debug|x86
2929
{D42297D9-5678-4449-BBFF-0424B35F6762}.Debug|x86.Build.0 = Debug|x86
3030
{D42297D9-5678-4449-BBFF-0424B35F6762}.Release|Any CPU.ActiveCfg = Release|x86
31+
{D42297D9-5678-4449-BBFF-0424B35F6762}.Release|Any CPU.Build.0 = Release|x86
3132
{D42297D9-5678-4449-BBFF-0424B35F6762}.Release|x86.ActiveCfg = Release|x86
3233
{D42297D9-5678-4449-BBFF-0424B35F6762}.Release|x86.Build.0 = Release|x86
3334
EndGlobalSection

MonoGame-Textbox/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.3")]
36-
[assembly: AssemblyFileVersion("1.0.0.3")]
35+
[assembly: AssemblyVersion("1.0.1.0")]
36+
[assembly: AssemblyFileVersion("1.0.1.0")]

MonoGame-Textbox/Text.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ private void ValidateLenght(int start, int end, int added)
156156
throw new ArgumentException("Character limit of " + MaxLength + " exceeded.");
157157
}
158158
}
159+
159160
// ReSharper restore UnusedParameter.Local
160161
}
161162
}

MonoGame-Textbox/packages.config

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="JetBrains.Annotations" version="10.2.1" targetFramework="net451" />
4-
<package id="MonoGame.Framework.WindowsDX" version="3.6.0.1625" targetFramework="net461" />
5-
<package id="SharpDX" version="2.6.3" targetFramework="net451" />
6-
<package id="SharpDX.Direct2D1" version="2.6.3" targetFramework="net451" />
7-
<package id="SharpDX.Direct3D11" version="2.6.3" targetFramework="net451" />
8-
<package id="SharpDX.Direct3D9" version="2.6.3" targetFramework="net451" />
9-
<package id="SharpDX.DXGI" version="2.6.3" targetFramework="net451" />
10-
<package id="SharpDX.MediaFoundation" version="2.6.3" targetFramework="net451" />
11-
<package id="SharpDX.XAudio2" version="2.6.3" targetFramework="net451" />
12-
<package id="SharpDX.XInput" version="2.6.3" targetFramework="net451" />
3+
<package id="JetBrains.Annotations" version="11.1.0" targetFramework="net461" />
4+
<package id="MonoGame.Framework.Portable" version="3.6.0.1625" targetFramework="net461" />
135
</packages>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you want to contribute to our repository (push, open pull requests), please u
1313

1414
# ![Icon](https://github.com/UnterrainerInformatik/Monogame-Textbox/raw/master/icon.png)Monogame-Textbox
1515

16-
An editable, multi-language, event-driven textbox for MonoGame that supports selection, special characters, SHIFT-CTRL combinations with cursor-keys and cut/copy/paste.
16+
This is a PCL that provides an editable, multi-language, event-driven textbox for MonoGame that supports selection, special characters, SHIFT-CTRL combinations with cursor-keys and cut/copy/paste.
1717

1818
## Getting Started
1919

Textbox-Test/Content/Content.mgcb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@
1313

1414
#---------------------------------- Content ---------------------------------#
1515

16+
#begin Arsenal.spritefont
17+
/importer:FontDescriptionImporter
18+
/processor:FontDescriptionProcessor
19+
/processorParam:PremultiplyAlpha=True
20+
/processorParam:TextureFormat=Compressed
21+
/build:Arsenal.spritefont
22+

Textbox-Test/Game1.cs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,13 @@ public class Game1 : Game
4646

4747
public Game1()
4848
{
49-
graphics = new GraphicsDeviceManager(this);
49+
GraphicsDeviceManager graphics = new GraphicsDeviceManager(this);
5050
Content.RootDirectory = "Content";
5151

5252
// Initialize the keyboard-event handler.
5353
KeyboardInput.Initialize(this, 500f, 20);
5454
}
5555

56-
/// <summary>
57-
/// Allows the game to perform any initialization it needs to before starting to run.
58-
/// This is where it can query for any required services and load any non-graphic
59-
/// related content. Calling base.Initialize will enumerate through any components
60-
/// and initialize them as well.
61-
/// </summary>
62-
protected override void Initialize()
63-
{
64-
// TODO: Add your initialization logic here
65-
66-
base.Initialize();
67-
}
68-
6956
/// <summary>
7057
/// LoadContent will be called once per game and is the place to load
7158
/// all of your content.
@@ -82,15 +69,6 @@ protected override void LoadContent()
8269
GraphicsDevice, font, Color.LightGray, Color.DarkGreen, 30);
8370
}
8471

85-
/// <summary>
86-
/// UnloadContent will be called once per game and is the place to unload
87-
/// game-specific content.
88-
/// </summary>
89-
protected override void UnloadContent()
90-
{
91-
// TODO: Unload any non ContentManager content here
92-
}
93-
9472
/// <summary>
9573
/// Allows the game to run logic such as updating the world,
9674
/// checking for collisions, gathering input, and playing audio.
@@ -112,7 +90,7 @@ protected override void Update(GameTime gameTime)
11290
textBox.Renderer.Color = Color.White;
11391
textBox.Cursor.Selection = new Color(Color.Purple, .4f);
11492

115-
float lerpAmount = (float) (gameTime.TotalGameTime.TotalMilliseconds % 500f/500f);
93+
float lerpAmount = (float) (gameTime.TotalGameTime.TotalMilliseconds % 500f / 500f);
11694
textBox.Cursor.Color = Color.Lerp(Color.DarkGray, Color.LightGray, lerpAmount);
11795

11896
textBox.Active = true;

Textbox-Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.3")]
36-
[assembly: AssemblyFileVersion("1.0.0.3")]
35+
[assembly: AssemblyVersion("1.0.1.0")]
36+
[assembly: AssemblyFileVersion("1.0.1.0")]

0 commit comments

Comments
 (0)