Skip to content

Commit 62b9f70

Browse files
committed
Switches project to PCL library
Updates README.md
1 parent 3085f30 commit 62b9f70

File tree

6 files changed

+29
-28
lines changed

6 files changed

+29
-28
lines changed

InputStateManager/InputStateManager.csproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
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>{48D4510A-1D34-4F2F-B8D1-72617109B28F}</ProjectGuid>
89
<OutputType>Library</OutputType>
910
<AppDesignerFolder>Properties</AppDesignerFolder>
1011
<RootNamespace>InputStateManager</RootNamespace>
1112
<AssemblyName>InputStateManager</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
14+
<DefaultLanguage>en-US</DefaultLanguage>
1315
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
<NuGetPackageImportStamp>
16-
</NuGetPackageImportStamp>
16+
17+
18+
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19+
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
20+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1721
</PropertyGroup>
1822
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1923
<DebugSymbols>true</DebugSymbols>
@@ -41,9 +45,6 @@
4145
<HintPath>packages\MonoGame.Framework.Portable.3.6.0.1625\lib\portable-net45+win8+wpa81\MonoGame.Framework.dll</HintPath>
4246
<Private>True</Private>
4347
</Reference>
44-
<Reference Include="System" />
45-
<Reference Include="Microsoft.CSharp" />
46-
<Reference Include="System.Xml" />
4748
</ItemGroup>
4849
<ItemGroup>
4950
<Compile Include="Inputs\GamePad\GamePadStates.cs" />
@@ -57,7 +58,7 @@
5758
<ItemGroup>
5859
<None Include="packages.config" />
5960
</ItemGroup>
60-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
61+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
6162
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6263
Other similar extension points exist, see Microsoft.Common.targets.
6364
<Target Name="BeforeBuild">

InputStateManager/Inputs/Key.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ internal Key()
5959
internal void Update()
6060
{
6161
OldState = State;
62-
State = Microsoft.Xna.Framework.Input.Keyboard.GetState();
62+
State = Keyboard.GetState();
6363
}
6464

6565
[PublicAPI]

InputStateManager/Inputs/Touch.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ internal Touch()
5151
Was = new WasSub();
5252
}
5353

54-
public int DisplayHeight => Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayHeight;
55-
public int DisplayWidth => Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayWidth;
56-
public DisplayOrientation DisplayOrientation => Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayOrientation;
57-
public bool IsGestureAvailable => Microsoft.Xna.Framework.Input.Touch.TouchPanel.IsGestureAvailable;
58-
public bool EnableMouseGestures => Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnableMouseGestures;
59-
public bool EnableMouseTouchPoint => Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnableMouseTouchPoint;
60-
public GestureType EnabledGestures => Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnabledGestures;
61-
public IntPtr WindowHandle => Microsoft.Xna.Framework.Input.Touch.TouchPanel.WindowHandle;
62-
public TouchPanelCapabilities GetCapabilities => Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetCapabilities();
54+
public int DisplayHeight => TouchPanel.DisplayHeight;
55+
public int DisplayWidth => TouchPanel.DisplayWidth;
56+
public DisplayOrientation DisplayOrientation => TouchPanel.DisplayOrientation;
57+
public bool IsGestureAvailable => TouchPanel.IsGestureAvailable;
58+
public bool EnableMouseGestures => TouchPanel.EnableMouseGestures;
59+
public bool EnableMouseTouchPoint => TouchPanel.EnableMouseTouchPoint;
60+
public GestureType EnabledGestures => TouchPanel.EnabledGestures;
61+
public IntPtr WindowHandle => TouchPanel.WindowHandle;
62+
public TouchPanelCapabilities GetCapabilities => TouchPanel.GetCapabilities();
6363

64-
public GestureSample ReadGesture() => Microsoft.Xna.Framework.Input.Touch.TouchPanel.ReadGesture();
64+
public GestureSample ReadGesture() => TouchPanel.ReadGesture();
6565

6666
private bool emulateWithMouse;
6767

@@ -72,11 +72,11 @@ public bool EmulateWithMouse
7272
{
7373
if (!emulateWithMouse)
7474
{
75-
Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnabledGestures = GestureType.Hold | GestureType.Tap | GestureType.DoubleTap |
75+
TouchPanel.EnabledGestures = GestureType.Hold | GestureType.Tap | GestureType.DoubleTap |
7676
GestureType.DragComplete | GestureType.Flick | GestureType.FreeDrag |
7777
GestureType.HorizontalDrag | GestureType.VerticalDrag;
78-
Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnableMouseGestures = true;
79-
Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnableMouseTouchPoint = true;
78+
TouchPanel.EnableMouseGestures = true;
79+
TouchPanel.EnableMouseTouchPoint = true;
8080
}
8181
emulateWithMouse = value;
8282
}
@@ -85,7 +85,7 @@ public bool EmulateWithMouse
8585
internal void Update()
8686
{
8787
Was.Collection = Is.Collection;
88-
Is.Collection = Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetState();
88+
Is.Collection = TouchPanel.GetState();
8989
}
9090

9191
[PublicAPI]

InputStateManager/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.1.0.1")]
36-
[assembly: AssemblyFileVersion("1.1.0.1")]
35+
[assembly: AssemblyVersion("1.1.0.2")]
36+
[assembly: AssemblyFileVersion("1.1.0.2")]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We accept pull requests!
1717

1818
# ![Icon](https://github.com/UnterrainerInformatik/InputStateManager/raw/master/icon.png)InputStateManager
1919

20-
This is a helper class for MonoGame useful for querying keyboard, mouse, touch and gamepad inputs.
20+
This is a PCL library for MonoGame useful for querying keyboard, mouse, touch and gamepad inputs.
2121

2222
Currently it provides convenience-methods in a fluent manner for:
2323

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("3.4.1.0")]
36-
[assembly: AssemblyFileVersion("3.4.1.0")]
35+
[assembly: AssemblyVersion("3.4.1.1")]
36+
[assembly: AssemblyFileVersion("3.4.1.1")]

0 commit comments

Comments
 (0)