From 3765f001519e3f067595b5786fb9d07db4737e56 Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Wed, 14 Dec 2011 19:22:17 +0000 Subject: [PATCH] - fixed a minor issue with pathes in MSI-Installer build script - added creators for concrete InputDevice instances - added a factory to manage InputDeviceCreators which are located in AddIn assemblies - implemented some InputDeviceCreators in ANX.InputSystem.Windows.XInput as reference - created the new InputSystem: ANX.InputSystem.Standard which is the default container for the new InputDevices. It is replaceable by the ANX.InputSystem.Recording e.g. - added ANX.InputSystem.Standard to build script and MSI-Installer build script - added ANX.InputSystem.Recording to the MSI-Installer build script - implemented AvailableNetworkSessions (and fixed another wrong class reported by ANXStatusComparer) - updated WindowsGame sample to support only one InputSystem at the time (replaced multi SelectBox with ComboBox) - renamed ANX.InputSystem.Windows.XInput to ANX.InputDevices.Windows.XInput because it no longer contains a InputSystem but InputDevices This version is UNSTABLE and not TESTED because of massive changes regarding the InputSystem !!! --- ANX.Framework.sln | 15 +- ANX.Framework/ANX.Framework.csproj | 6 + ANX.Framework/Net/AvailableNetworkSession.cs | 135 ++++++++++- ANX.Framework/NonXNA/AddIn.cs | 27 +++ ANX.Framework/NonXNA/InputDeviceFactory.cs | 216 ++++++++++++++++++ ANX.Framework/NonXNA/InputSystem/IGamePad.cs | 55 ++++- .../NonXNA/InputSystem/IGamePadCreator.cs | 60 +++++ .../NonXNA/InputSystem/IInputDeviceCreator.cs | 64 ++++++ .../NonXNA/InputSystem/IKeyboardCreator.cs | 60 +++++ .../IMotionSensingDeviceCreator.cs | 62 +++++ .../NonXNA/InputSystem/IMouseCreator.cs | 60 +++++ ANX.Framework/Properties/AssemblyInfo.cs | 4 +- .../ANX.InputSystem.Standard.csproj | 79 +++++++ .../Creator.cs | 30 +-- .../Metadata.Designer.cs | 72 ++++++ .../ANX.InputSystem.Standard/Metadata.resx | 123 ++++++++++ .../Properties/AssemblyInfo.cs | 36 +++ ...=> ANX.InputDevices.Windows.XInput.csproj} | 8 +- .../FormatConverter.cs | 2 +- .../ANX.InputSystem.Windows.XInput/GamePad.cs | 2 +- .../GamePadCreator.cs | 85 +++++++ .../Keyboard.cs | 4 +- .../KeyboardCreator.cs | 85 +++++++ .../Metadata.Designer.cs | 4 +- .../ANX.InputSystem.Windows.XInput/Mouse.cs | 2 +- .../MouseCreator.cs | 85 +++++++ .../Properties/AssemblyInfo.cs | 8 +- Installer/anx.wxs | 14 +- .../RecordingSample/RecordingSample.csproj | 4 +- Samples/KeyboardSample/KeyboardSample.csproj | 4 +- Samples/RenderTarget/RenderTarget.csproj | 4 +- Samples/SimpleSprite/SimpleSprite.csproj | 4 +- Samples/StencilBuffer/StencilBuffer.csproj | 4 +- Samples/TextRendering/TextRendering.csproj | 4 +- .../VertexIndexBuffer.csproj | 4 +- Samples/WindowsGame/AddInSelector.Designer.cs | 19 +- Samples/WindowsGame/AddInSelector.cs | 4 +- Samples/WindowsGame/Program.cs | 2 +- Samples/WindowsGame/WindowsGame.csproj | 8 +- build/ANX.Framework.build | 31 ++- 40 files changed, 1416 insertions(+), 79 deletions(-) create mode 100644 ANX.Framework/NonXNA/InputDeviceFactory.cs create mode 100644 ANX.Framework/NonXNA/InputSystem/IGamePadCreator.cs create mode 100644 ANX.Framework/NonXNA/InputSystem/IInputDeviceCreator.cs create mode 100644 ANX.Framework/NonXNA/InputSystem/IKeyboardCreator.cs create mode 100644 ANX.Framework/NonXNA/InputSystem/IMotionSensingDeviceCreator.cs create mode 100644 ANX.Framework/NonXNA/InputSystem/IMouseCreator.cs create mode 100644 InputSystems/ANX.InputSystem.Standard/ANX.InputSystem.Standard.csproj rename InputSystems/{ANX.InputSystem.Windows.XInput => ANX.InputSystem.Standard}/Creator.cs (80%) create mode 100644 InputSystems/ANX.InputSystem.Standard/Metadata.Designer.cs create mode 100644 InputSystems/ANX.InputSystem.Standard/Metadata.resx create mode 100644 InputSystems/ANX.InputSystem.Standard/Properties/AssemblyInfo.cs rename InputSystems/ANX.InputSystem.Windows.XInput/{ANX.InputSystem.Windows.XInput.csproj => ANX.InputDevices.Windows.XInput.csproj} (91%) create mode 100644 InputSystems/ANX.InputSystem.Windows.XInput/GamePadCreator.cs create mode 100644 InputSystems/ANX.InputSystem.Windows.XInput/KeyboardCreator.cs create mode 100644 InputSystems/ANX.InputSystem.Windows.XInput/MouseCreator.cs diff --git a/ANX.Framework.sln b/ANX.Framework.sln index 6f80e5a6..06d999f2 100644 --- a/ANX.Framework.sln +++ b/ANX.Framework.sln @@ -79,7 +79,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XNA", "XNA", "{BD648BB8-EF2 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputSystem.Windows.Kinect", "InputSystems\ANX.InputSystem.Windows.Kinect\ANX.InputSystem.Windows.Kinect.csproj", "{E5D69E75-D77C-493F-BBDA-6F9E73B82549}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputSystem.Windows.XInput", "InputSystems\ANX.InputSystem.Windows.XInput\ANX.InputSystem.Windows.XInput.csproj", "{60D08399-244F-46A3-91F1-4CFD26D961A3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.Windows.XInput", "InputSystems\ANX.InputSystem.Windows.XInput\ANX.InputDevices.Windows.XInput.csproj", "{60D08399-244F-46A3-91F1-4CFD26D961A3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.Windows.DX10", "RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj", "{5BE49183-2F6F-4527-AC90-D816911FCF90}" EndProject @@ -128,6 +128,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DX11", "DX11", "{6285F3EF-0 shader\DX11\SpriteBatch.fx = shader\DX11\SpriteBatch.fx EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputSystem.Standard", "InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard.csproj", "{49066074-3B7B-4A55-B122-6BD33AB73558}" +EndProject Global GlobalSection(SubversionScc) = preSolution Svn-Managed = True @@ -420,6 +422,16 @@ Global {160150D5-38E6-482D-97F5-2624F322A854}.Release|Mixed Platforms.Build.0 = Release|x86 {160150D5-38E6-482D-97F5-2624F322A854}.Release|x86.ActiveCfg = Release|x86 {160150D5-38E6-482D-97F5-2624F322A854}.Release|x86.Build.0 = Release|x86 + {49066074-3B7B-4A55-B122-6BD33AB73558}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Debug|x86.ActiveCfg = Debug|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Release|Any CPU.Build.0 = Release|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {49066074-3B7B-4A55-B122-6BD33AB73558}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -448,6 +460,7 @@ Global {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {5CA3CDF5-4D2C-42AC-AD08-641BD3992B75} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} + {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9} {CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF} diff --git a/ANX.Framework/ANX.Framework.csproj b/ANX.Framework/ANX.Framework.csproj index 8a2a1b84..ebd35114 100644 --- a/ANX.Framework/ANX.Framework.csproj +++ b/ANX.Framework/ANX.Framework.csproj @@ -421,9 +421,15 @@ + + + + + + diff --git a/ANX.Framework/Net/AvailableNetworkSession.cs b/ANX.Framework/Net/AvailableNetworkSession.cs index eaf37382..6093870e 100644 --- a/ANX.Framework/Net/AvailableNetworkSession.cs +++ b/ANX.Framework/Net/AvailableNetworkSession.cs @@ -1,13 +1,14 @@ -using System; +#region Using Statements +using System; +using System.Net; + +#endregion // Using Statements #region License // // This file is part of the ANX.Framework created by the "ANX.Framework developer group". // -// This file is released under the Ms-PL license. -// -// // // Microsoft Public License (Ms-PL) // @@ -49,7 +50,129 @@ namespace ANX.Framework.Net { - public class AvailableNetworkSession + public sealed class AvailableNetworkSession { - } + private NetworkSessionType sessionType; + private int openPublicGamerSlots; + private QualityOfService qualityOfService; + private NetworkSessionProperties sessionProperties; + private IPEndPoint endPoint; + private IPEndPoint internalendPoint; + private int _currentGameCount; + private string hostGamertag; + private int openPrivateGamerSlots; + + public AvailableNetworkSession() + { + qualityOfService = new QualityOfService(); + } + + public int CurrentGamerCount + { + get + { + return _currentGameCount; + } + internal set + { + _currentGameCount = value; + } + } + + public string HostGamertag + { + get + { + return hostGamertag; + } + internal set + { + hostGamertag = value; + } + } + + public int OpenPrivateGamerSlots + { + get + { + return openPrivateGamerSlots; + } + internal set + { + openPrivateGamerSlots = value; + } + } + + public int OpenPublicGamerSlots + { + get + { + return openPublicGamerSlots; + } + internal set + { + openPublicGamerSlots = value; + } + } + + public QualityOfService QualityOfService + { + get + { + return qualityOfService; + } + internal set + { + qualityOfService = value; + } + } + + public NetworkSessionProperties SessionProperties + { + get + { + return sessionProperties; + } + internal set + { + sessionProperties = value; + } + } + + internal IPEndPoint EndPoint + { + get + { + return endPoint; + } + set + { + endPoint = value; + } + } + + internal IPEndPoint InternalEndpont + { + get + { + return internalendPoint; + } + set + { + internalendPoint = value; + } + } + + internal NetworkSessionType SessionType + { + get + { + return this.sessionType; + } + set + { + this.sessionType = value; + } + } + } } diff --git a/ANX.Framework/NonXNA/AddIn.cs b/ANX.Framework/NonXNA/AddIn.cs index 30f01d34..8846e657 100644 --- a/ANX.Framework/NonXNA/AddIn.cs +++ b/ANX.Framework/NonXNA/AddIn.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Resources; using System.Collections; using System.Linq; +using ANX.Framework.NonXNA.InputSystem; #endregion @@ -130,6 +131,32 @@ namespace ANX.Framework.NonXNA } catch { } } + + // + // Scan the addin for InputDeviceCreators and register them + // + + foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IGamePadCreator).IsAssignableFrom(p))) + { + InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IGamePadCreator); + } + + foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IKeyboardCreator).IsAssignableFrom(p))) + { + InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IKeyboardCreator); + } + + foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IMouseCreator).IsAssignableFrom(p))) + { + InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMouseCreator); + } + +#if XNAEXT + foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IMotionSensingDeviceCreator).IsAssignableFrom(p))) + { + InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMotionSensingDeviceCreator); + } +#endif } } diff --git a/ANX.Framework/NonXNA/InputDeviceFactory.cs b/ANX.Framework/NonXNA/InputDeviceFactory.cs new file mode 100644 index 00000000..a056e572 --- /dev/null +++ b/ANX.Framework/NonXNA/InputDeviceFactory.cs @@ -0,0 +1,216 @@ +#region Using Statements +using System; +using System.IO; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; +using ANX.Framework.Input; +using NLog; +using System.Collections; +using System.Resources; +using ANX.Framework.NonXNA.InputSystem; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA +{ + public class InputDeviceFactory + { + #region Private Members + private static InputDeviceFactory instance; + + private Dictionary gamePadCreators; + private Dictionary keyboardCreators; + private Dictionary mouseCreators; +#if XNAEXT + private Dictionary motionSensingDeviceCreators; +#endif + + private static Logger logger = LogManager.GetCurrentClassLogger(); + + #endregion // Private Members + + public static InputDeviceFactory Instance + { + get + { + if (instance == null) + { + instance = new InputDeviceFactory(); + logger.Debug("Created InputDeviceFactory instance"); + } + + return instance; + } + } + + private InputDeviceFactory() + { + this.gamePadCreators = new Dictionary(); + this.keyboardCreators = new Dictionary(); + this.mouseCreators = new Dictionary(); +#if XNAEXT + this.motionSensingDeviceCreators = new Dictionary(); +#endif + } + + #region AddCreator + public void AddCreator(IGamePadCreator creator) + { + string creatorName = creator.Name.ToLowerInvariant(); + + if (gamePadCreators.ContainsKey(creatorName)) + { + throw new Exception("Duplicate GamePadCreator found. A GamePadCreator with the name '" + creator.Name + "' was already registered."); + } + + gamePadCreators.Add(creatorName, creator); + + logger.Debug("Added GamePadCreator '{0}'. Total count of registered GamePadCreators is now {1}.", creatorName, gamePadCreators.Count); + } + + public void AddCreator(IKeyboardCreator creator) + { + string creatorName = creator.Name.ToLowerInvariant(); + + if (keyboardCreators.ContainsKey(creatorName)) + { + throw new Exception("Duplicate KeyboardCreator found. A KeyboardCreator with the name '" + creator.Name + "' was already registered."); + } + + keyboardCreators.Add(creatorName, creator); + + logger.Debug("Added KeyboardCreator '{0}'. Total count of registered KeyboardCreators is now {1}.", creatorName, keyboardCreators.Count); + } + + public void AddCreator(IMouseCreator creator) + { + string creatorName = creator.Name.ToLowerInvariant(); + + if (mouseCreators.ContainsKey(creatorName)) + { + throw new Exception("Duplicate MouseCreator found. A MouseCreator with the name '" + creator.Name + "' was already registered."); + } + + mouseCreators.Add(creatorName, creator); + + logger.Debug("Added MouseCreator '{0}'. Total count of registered MouseCreators is now {1}.", creatorName, mouseCreators.Count); + } + +#if XNAEXT + public void AddCreator(IMotionSensingDeviceCreator creator) + { + string creatorName = creator.Name.ToLowerInvariant(); + + if (motionSensingDeviceCreators.ContainsKey(creatorName)) + { + throw new Exception("Duplicate MotionSensingDeviceCreator found. A MotionSensingDeviceCreator with the name '" + creator.Name + "' was already registered."); + } + + motionSensingDeviceCreators.Add(creatorName, creator); + + logger.Debug("Added MotionSensingDeviceCreator '{0}'. Total count of registered MotionSensingDeviceCreators is now {1}.", creatorName, motionSensingDeviceCreators.Count); + } +#endif + + #endregion // AddCreator + + public IGamePad GetDefaultGamePad() + { + //TODO: this is a very basic implementation only which needs some more work + + if (this.gamePadCreators.Count > 0) + { + return this.gamePadCreators.Values.First().CreateGamePadInstance(); + } + + throw new Exception("Unable to create instance of GamePad because no GamePadCreator was registered."); + } + + public IMouse GetDefaultMouse() + { + //TODO: this is a very basic implementation only which needs some more work + + if (this.mouseCreators.Count > 0) + { + return this.mouseCreators.Values.First().CreateMouseInstance(); + } + + throw new Exception("Unable to create instance of Mouse because no MouseCreator was registered."); + } + + public IKeyboard GetDefaultKeyboard() + { + //TODO: this is a very basic implementation only which needs some more work + + if (this.keyboardCreators.Count > 0) + { + return this.keyboardCreators.Values.First().CreateKeyboardInstance(); + } + + throw new Exception("Unable to create instance of Keyboard because no KeyboardCreator was registered."); + } + +#if XNAEXT + public IMotionSensingDevice GetDefaultMotionSensingDevice() + { + //TODO: this is a very basic implementation only which needs some more work + + if (this.motionSensingDeviceCreators.Count > 0) + { + return this.motionSensingDeviceCreators.Values.First().CreateMotionSensingDeviceInstance(); + } + + throw new Exception("Unable to create instance of MotionSensingDevice because no MotionSensingDeviceCreator was registered."); + } +#endif + + } +} diff --git a/ANX.Framework/NonXNA/InputSystem/IGamePad.cs b/ANX.Framework/NonXNA/InputSystem/IGamePad.cs index d43b78bc..b3868dbb 100644 --- a/ANX.Framework/NonXNA/InputSystem/IGamePad.cs +++ b/ANX.Framework/NonXNA/InputSystem/IGamePad.cs @@ -1,9 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +#region Using Statements +using System; using ANX.Framework.Input; +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + namespace ANX.Framework.NonXNA { public interface IGamePad diff --git a/ANX.Framework/NonXNA/InputSystem/IGamePadCreator.cs b/ANX.Framework/NonXNA/InputSystem/IGamePadCreator.cs new file mode 100644 index 00000000..da43ccda --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/IGamePadCreator.cs @@ -0,0 +1,60 @@ +#region Using Statements +using System; +using ANX.Framework.Input; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA.InputSystem +{ + public interface IGamePadCreator : IInputDeviceCreator + { + IGamePad CreateGamePadInstance(); + } +} diff --git a/ANX.Framework/NonXNA/InputSystem/IInputDeviceCreator.cs b/ANX.Framework/NonXNA/InputSystem/IInputDeviceCreator.cs new file mode 100644 index 00000000..235790d5 --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/IInputDeviceCreator.cs @@ -0,0 +1,64 @@ +#region Using Statements +using System; +using ANX.Framework.Input; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA.InputSystem +{ + public interface IInputDeviceCreator + { + string Name { get; } + + void RegisterCreator(InputDeviceFactory factory); + + int Priority { get; } + } +} diff --git a/ANX.Framework/NonXNA/InputSystem/IKeyboardCreator.cs b/ANX.Framework/NonXNA/InputSystem/IKeyboardCreator.cs new file mode 100644 index 00000000..7a80d339 --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/IKeyboardCreator.cs @@ -0,0 +1,60 @@ +#region Using Statements +using System; +using ANX.Framework.Input; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA.InputSystem +{ + public interface IKeyboardCreator : IInputDeviceCreator + { + IKeyboard CreateKeyboardInstance(); + } +} diff --git a/ANX.Framework/NonXNA/InputSystem/IMotionSensingDeviceCreator.cs b/ANX.Framework/NonXNA/InputSystem/IMotionSensingDeviceCreator.cs new file mode 100644 index 00000000..ef959f0a --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/IMotionSensingDeviceCreator.cs @@ -0,0 +1,62 @@ +#region Using Statements +using System; +using ANX.Framework.Input; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA.InputSystem +{ +#if XNAEXT + public interface IMotionSensingDeviceCreator : IInputDeviceCreator + { + IMotionSensingDevice CreateMotionSensingDeviceInstance(); + } +#endif +} diff --git a/ANX.Framework/NonXNA/InputSystem/IMouseCreator.cs b/ANX.Framework/NonXNA/InputSystem/IMouseCreator.cs new file mode 100644 index 00000000..445d0c18 --- /dev/null +++ b/ANX.Framework/NonXNA/InputSystem/IMouseCreator.cs @@ -0,0 +1,60 @@ +#region Using Statements +using System; +using ANX.Framework.Input; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.Framework.NonXNA.InputSystem +{ + public interface IMouseCreator : IInputDeviceCreator + { + IMouse CreateMouseInstance(); + } +} diff --git a/ANX.Framework/Properties/AssemblyInfo.cs b/ANX.Framework/Properties/AssemblyInfo.cs index 5fd35fab..74e3885a 100644 --- a/ANX.Framework/Properties/AssemblyInfo.cs +++ b/ANX.Framework/Properties/AssemblyInfo.cs @@ -31,8 +31,8 @@ using System.Runtime.InteropServices; // // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: -[assembly: AssemblyVersion("0.4.36.*")] -[assembly: AssemblyFileVersion("0.4.36.0")] +[assembly: AssemblyVersion("0.4.37.*")] +[assembly: AssemblyFileVersion("0.4.37.0")] [assembly:InternalsVisibleTo("ANX.Framework.Windows.DX10")] [assembly:InternalsVisibleTo("ANX.RenderSystem.Windows.DX11")] diff --git a/InputSystems/ANX.InputSystem.Standard/ANX.InputSystem.Standard.csproj b/InputSystems/ANX.InputSystem.Standard/ANX.InputSystem.Standard.csproj new file mode 100644 index 00000000..8e9f71ca --- /dev/null +++ b/InputSystems/ANX.InputSystem.Standard/ANX.InputSystem.Standard.csproj @@ -0,0 +1,79 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {49066074-3B7B-4A55-B122-6BD33AB73558} + Library + Properties + ANX.InputSystem.Standard + ANX.InputSystem.Standard + v4.0 + 512 + + + true + full + false + ..\..\bin\Debug\ + TRACE;DEBUG;XNAEXT + prompt + 4 + + + pdbonly + true + ..\..\bin\Release\ + TRACE;XNAEXT + prompt + 4 + + + + False + ..\..\lib\NLog\NLog.dll + + + False + ..\..\lib\NLog\NLog.Extended.dll + + + + + + + + + + + + + Metadata.resx + True + True + + + + + + {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} + ANX.Framework + + + + + PublicResXFileCodeGenerator + Metadata.Designer.cs + + + + + \ No newline at end of file diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/Creator.cs b/InputSystems/ANX.InputSystem.Standard/Creator.cs similarity index 80% rename from InputSystems/ANX.InputSystem.Windows.XInput/Creator.cs rename to InputSystems/ANX.InputSystem.Standard/Creator.cs index 6f31c1e6..81ffa479 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/Creator.cs +++ b/InputSystems/ANX.InputSystem.Standard/Creator.cs @@ -57,7 +57,7 @@ using NLog; #endregion // License -namespace ANX.InputSystem.Windows.XInput +namespace ANX.InputDevices.Windows.XInput { public class Creator : IInputSystemCreator { @@ -67,27 +67,26 @@ namespace ANX.InputSystem.Windows.XInput { get { - return "XInput"; + return "Standard"; } } public int Priority { - get { return 10; } + get { return 0; } } public bool IsSupported { get { - //TODO: this is just a very basic version of test for support - return AddInSystemFactory.Instance.OperatingSystem.Platform == PlatformID.Win32NT; + return true; } } public void RegisterCreator(AddInSystemFactory factory) { - logger.Debug("adding XInput creator to creator collection of AddInSystemFactory"); + logger.Debug("adding Standard InputSystem creator to creator collection of AddInSystemFactory"); factory.AddCreator(this); } @@ -95,9 +94,9 @@ namespace ANX.InputSystem.Windows.XInput { get { - logger.Debug("returning a new XInput GamePad device"); + logger.Debug("returning a new GamePad device"); AddInSystemFactory.Instance.PreventInputSystemChange(); - return new GamePad(); + return InputDeviceFactory.Instance.GetDefaultGamePad(); } } @@ -105,9 +104,9 @@ namespace ANX.InputSystem.Windows.XInput { get { - logger.Debug("returning a new XInput Mouse device"); + logger.Debug("returning a new Mouse device"); AddInSystemFactory.Instance.PreventInputSystemChange(); - return new Mouse(); + return InputDeviceFactory.Instance.GetDefaultMouse(); } } @@ -115,16 +114,21 @@ namespace ANX.InputSystem.Windows.XInput { get { - logger.Debug("returning a new XInput Keyboard device"); + logger.Debug("returning a new Keyboard device"); AddInSystemFactory.Instance.PreventInputSystemChange(); - return new Keyboard(); + return InputDeviceFactory.Instance.GetDefaultKeyboard(); } } #if XNAEXT public IMotionSensingDevice MotionSensingDevice { - get { return null; } + get + { + logger.Debug("returning a new MotionSensingDevice device"); + AddInSystemFactory.Instance.PreventInputSystemChange(); + return InputDeviceFactory.Instance.GetDefaultMotionSensingDevice(); + } } #endif } diff --git a/InputSystems/ANX.InputSystem.Standard/Metadata.Designer.cs b/InputSystems/ANX.InputSystem.Standard/Metadata.Designer.cs new file mode 100644 index 00000000..939bebff --- /dev/null +++ b/InputSystems/ANX.InputSystem.Standard/Metadata.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.239 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace ANX.InputSystem.Standard { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Metadata { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Metadata() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ANX.InputSystem.Standard.Metadata", typeof(Metadata).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Win32NT Unix MacOsX ähnelt. + /// + public static string SupportedPlatforms { + get { + return ResourceManager.GetString("SupportedPlatforms", resourceCulture); + } + } + } +} diff --git a/InputSystems/ANX.InputSystem.Standard/Metadata.resx b/InputSystems/ANX.InputSystem.Standard/Metadata.resx new file mode 100644 index 00000000..8451d556 --- /dev/null +++ b/InputSystems/ANX.InputSystem.Standard/Metadata.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Win32NT Unix MacOsX + + \ No newline at end of file diff --git a/InputSystems/ANX.InputSystem.Standard/Properties/AssemblyInfo.cs b/InputSystems/ANX.InputSystem.Standard/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..49e31c4a --- /dev/null +++ b/InputSystems/ANX.InputSystem.Standard/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("ANX.InputSystem.Standard")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ANX.Framework Team")] +[assembly: AssemblyProduct("ANX.InputSystem.Standard")] +[assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2011")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("aa8530cd-9404-4eb5-a6b7-8b31b087c198")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.5.0.0")] +[assembly: AssemblyFileVersion("0.5.0.0")] diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputSystem.Windows.XInput.csproj b/InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputDevices.Windows.XInput.csproj similarity index 91% rename from InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputSystem.Windows.XInput.csproj rename to InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputDevices.Windows.XInput.csproj index 4157d691..985fb8e5 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputSystem.Windows.XInput.csproj +++ b/InputSystems/ANX.InputSystem.Windows.XInput/ANX.InputDevices.Windows.XInput.csproj @@ -8,8 +8,8 @@ {60D08399-244F-46A3-91F1-4CFD26D961A3} Library Properties - ANX.InputSystem.Windows.XInput - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput + ANX.InputDevices.Windows.XInput v4.0 512 @@ -57,9 +57,11 @@ - + + + Metadata.resx True diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/FormatConverter.cs b/InputSystems/ANX.InputSystem.Windows.XInput/FormatConverter.cs index 950f43ec..cb739425 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/FormatConverter.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/FormatConverter.cs @@ -52,7 +52,7 @@ using SharpDX.XInput; #endregion // License -namespace ANX.InputSystem.Windows.XInput +namespace ANX.InputDevices.Windows.XInput { internal class FormatConverter { diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/GamePad.cs b/InputSystems/ANX.InputSystem.Windows.XInput/GamePad.cs index f9831b42..5e609ee7 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/GamePad.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/GamePad.cs @@ -59,7 +59,7 @@ using SharpDX.XInput; #endregion // License -namespace ANX.InputSystem.Windows.XInput +namespace ANX.InputDevices.Windows.XInput { public class GamePad : IGamePad { diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/GamePadCreator.cs b/InputSystems/ANX.InputSystem.Windows.XInput/GamePadCreator.cs new file mode 100644 index 00000000..5f963e2b --- /dev/null +++ b/InputSystems/ANX.InputSystem.Windows.XInput/GamePadCreator.cs @@ -0,0 +1,85 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Runtime.InteropServices; +using ANX.Framework.NonXNA; +using NLog; +using ANX.Framework.NonXNA.InputSystem; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.InputDevices.Windows.XInput +{ + public class GamePadCreator : IGamePadCreator + { + public string Name + { + get { return "XInput.GamePad"; } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(this); + } + + public int Priority + { + get { return 10; } + } + + public IGamePad CreateGamePadInstance() + { + return new GamePad(); + } + } +} diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/Keyboard.cs b/InputSystems/ANX.InputSystem.Windows.XInput/Keyboard.cs index 0417e917..eb77c905 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/Keyboard.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/Keyboard.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; -using ANX.InputSystem; +using ANX.InputDevices; using ANX.Framework.NonXNA; using SharpDX.DirectInput; using DXKeyboard=SharpDX.DirectInput.Keyboard; @@ -56,7 +56,7 @@ using DXKeyboard=SharpDX.DirectInput.Keyboard; #endregion // License -namespace ANX.InputSystem.Windows.XInput +namespace ANX.InputDevices.Windows.XInput { public class Keyboard : IKeyboard { diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/KeyboardCreator.cs b/InputSystems/ANX.InputSystem.Windows.XInput/KeyboardCreator.cs new file mode 100644 index 00000000..9efd34f8 --- /dev/null +++ b/InputSystems/ANX.InputSystem.Windows.XInput/KeyboardCreator.cs @@ -0,0 +1,85 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Runtime.InteropServices; +using ANX.Framework.NonXNA; +using NLog; +using ANX.Framework.NonXNA.InputSystem; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.InputDevices.Windows.XInput +{ + public class KeyboardCreator : IKeyboardCreator + { + public string Name + { + get { return "DirectInput.DXKeyboard"; } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(this); + } + + public int Priority + { + get { return 10; } + } + + public IKeyboard CreateKeyboardInstance() + { + return new Keyboard(); + } + } +} diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/Metadata.Designer.cs b/InputSystems/ANX.InputSystem.Windows.XInput/Metadata.Designer.cs index 7f23c917..5b92a760 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/Metadata.Designer.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/Metadata.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace ANX.Framework.Windows.DX10 { +namespace ANX.InputDevices.Windows.XInput { using System; @@ -39,7 +39,7 @@ namespace ANX.Framework.Windows.DX10 { public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ANX.Framework.Windows.DX10.Metadata", typeof(Metadata).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ANX.InputDevices.Windows.XInput.Metadata", typeof(Metadata).Assembly); resourceMan = temp; } return resourceMan; diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/Mouse.cs b/InputSystems/ANX.InputSystem.Windows.XInput/Mouse.cs index dc8226fc..199cec19 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/Mouse.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/Mouse.cs @@ -60,7 +60,7 @@ using ANX.Framework; using MouseX = SharpDX.DirectInput.Mouse; -namespace ANX.InputSystem.Windows.XInput +namespace ANX.InputDevices.Windows.XInput { class Mouse : IMouse { diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/MouseCreator.cs b/InputSystems/ANX.InputSystem.Windows.XInput/MouseCreator.cs new file mode 100644 index 00000000..25ff33be --- /dev/null +++ b/InputSystems/ANX.InputSystem.Windows.XInput/MouseCreator.cs @@ -0,0 +1,85 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Runtime.InteropServices; +using ANX.Framework.NonXNA; +using NLog; +using ANX.Framework.NonXNA.InputSystem; + +#endregion // Using Statements + +#region License + +// +// This file is part of the ANX.Framework created by the "ANX.Framework developer group". +// +// This file is released under the Ms-PL license. +// +// +// +// Microsoft Public License (Ms-PL) +// +// This license governs use of the accompanying software. If you use the software, you accept this license. +// If you do not accept the license, do not use the software. +// +// 1.Definitions +// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning +// here as under U.S. copyright law. +// A "contribution" is the original software, or any additions or changes to the software. +// A "contributor" is any person that distributes its contribution under this license. +// "Licensed patents" are a contributor's patent claims that read directly on its contribution. +// +// 2.Grant of Rights +// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations +// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to +// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution +// or any derivative works that you create. +// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in +// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed +// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution +// in the software or derivative works of the contribution in the software. +// +// 3.Conditions and Limitations +// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your +// patent license from such contributor to the software ends automatically. +// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution +// notices that are present in the software. +// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including +// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or +// object code form, you may only do so under a license that complies with this license. +// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, +// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the +// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a +// particular purpose and non-infringement. + +#endregion // License + +namespace ANX.InputDevices.Windows.XInput +{ + public class MouseCreator : IMouseCreator + { + public string Name + { + get { return "DirectInput.Mouse"; } + } + + public void RegisterCreator(InputDeviceFactory factory) + { + factory.AddCreator(this); + } + + public int Priority + { + get { return 10; } + } + + public IMouse CreateMouseInstance() + { + return new Mouse(); + } + } +} diff --git a/InputSystems/ANX.InputSystem.Windows.XInput/Properties/AssemblyInfo.cs b/InputSystems/ANX.InputSystem.Windows.XInput/Properties/AssemblyInfo.cs index 0a676532..a62d23c7 100644 --- a/InputSystems/ANX.InputSystem.Windows.XInput/Properties/AssemblyInfo.cs +++ b/InputSystems/ANX.InputSystem.Windows.XInput/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // Allgemeine Informationen über eine Assembly werden über die folgenden // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // die mit einer Assembly verknüpft sind. -[assembly: AssemblyTitle("ANX.InputSystem.Windows.XInput")] +[assembly: AssemblyTitle("ANX.InputDevices.Windows.XInput")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("ANX.Framework Team")] -[assembly: AssemblyProduct("ANX.InputSystem.Windows.XInput")] +[assembly: AssemblyProduct("ANX.InputDevices.Windows.XInput")] [assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.3.0")] -[assembly: AssemblyFileVersion("0.6.3.0")] +[assembly: AssemblyVersion("0.6.5.0")] +[assembly: AssemblyFileVersion("0.6.5.0")] diff --git a/Installer/anx.wxs b/Installer/anx.wxs index 82505228..660b6be2 100644 --- a/Installer/anx.wxs +++ b/Installer/anx.wxs @@ -50,8 +50,8 @@ - - + + @@ -65,8 +65,14 @@ - - + + + + + + + + diff --git a/RecordingSample/RecordingSample/RecordingSample.csproj b/RecordingSample/RecordingSample/RecordingSample.csproj index f5ff1bf9..439eaf00 100644 --- a/RecordingSample/RecordingSample/RecordingSample.csproj +++ b/RecordingSample/RecordingSample/RecordingSample.csproj @@ -87,9 +87,9 @@ {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} ANX.InputSystem.Recording - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/KeyboardSample/KeyboardSample.csproj b/Samples/KeyboardSample/KeyboardSample.csproj index 7512d533..9b010164 100644 --- a/Samples/KeyboardSample/KeyboardSample.csproj +++ b/Samples/KeyboardSample/KeyboardSample.csproj @@ -83,9 +83,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/RenderTarget/RenderTarget.csproj b/Samples/RenderTarget/RenderTarget.csproj index ece9270c..c10e2be9 100644 --- a/Samples/RenderTarget/RenderTarget.csproj +++ b/Samples/RenderTarget/RenderTarget.csproj @@ -83,9 +83,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/SimpleSprite/SimpleSprite.csproj b/Samples/SimpleSprite/SimpleSprite.csproj index ed7f2d85..3ad9b768 100644 --- a/Samples/SimpleSprite/SimpleSprite.csproj +++ b/Samples/SimpleSprite/SimpleSprite.csproj @@ -83,9 +83,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/StencilBuffer/StencilBuffer.csproj b/Samples/StencilBuffer/StencilBuffer.csproj index a20046f3..221292b6 100644 --- a/Samples/StencilBuffer/StencilBuffer.csproj +++ b/Samples/StencilBuffer/StencilBuffer.csproj @@ -120,9 +120,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/TextRendering/TextRendering.csproj b/Samples/TextRendering/TextRendering.csproj index 48c01be5..c636320f 100644 --- a/Samples/TextRendering/TextRendering.csproj +++ b/Samples/TextRendering/TextRendering.csproj @@ -83,9 +83,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/VertexIndexBuffer/VertexIndexBuffer.csproj b/Samples/VertexIndexBuffer/VertexIndexBuffer.csproj index a8a805d3..aae322ef 100644 --- a/Samples/VertexIndexBuffer/VertexIndexBuffer.csproj +++ b/Samples/VertexIndexBuffer/VertexIndexBuffer.csproj @@ -83,9 +83,9 @@ {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} ANX.Framework - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/Samples/WindowsGame/AddInSelector.Designer.cs b/Samples/WindowsGame/AddInSelector.Designer.cs index 16ffcbc2..82481fc6 100644 --- a/Samples/WindowsGame/AddInSelector.Designer.cs +++ b/Samples/WindowsGame/AddInSelector.Designer.cs @@ -37,7 +37,7 @@ this.cbAudioSystem = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.cbInputSystems = new System.Windows.Forms.CheckedListBox(); + this.cbInputSystem = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -117,13 +117,14 @@ this.pictureBox1.TabIndex = 8; this.pictureBox1.TabStop = false; // - // cbInputSystems + // cbInputSystem // - this.cbInputSystems.FormattingEnabled = true; - this.cbInputSystems.Location = new System.Drawing.Point(184, 236); - this.cbInputSystems.Name = "cbInputSystems"; - this.cbInputSystems.Size = new System.Drawing.Size(277, 94); - this.cbInputSystems.TabIndex = 9; + this.cbInputSystem.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbInputSystem.FormattingEnabled = true; + this.cbInputSystem.Location = new System.Drawing.Point(184, 233); + this.cbInputSystem.Name = "cbInputSystem"; + this.cbInputSystem.Size = new System.Drawing.Size(277, 21); + this.cbInputSystem.TabIndex = 9; // // AddInSelector // @@ -132,7 +133,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.button2; this.ClientSize = new System.Drawing.Size(507, 371); - this.Controls.Add(this.cbInputSystems); + this.Controls.Add(this.cbInputSystem); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.cbAudioSystem); this.Controls.Add(this.label3); @@ -164,6 +165,6 @@ public System.Windows.Forms.ComboBox cbAudioSystem; private System.Windows.Forms.Label label3; private System.Windows.Forms.PictureBox pictureBox1; - internal System.Windows.Forms.CheckedListBox cbInputSystems; + public System.Windows.Forms.ComboBox cbInputSystem; } } \ No newline at end of file diff --git a/Samples/WindowsGame/AddInSelector.cs b/Samples/WindowsGame/AddInSelector.cs index e96d4735..f97ef926 100644 --- a/Samples/WindowsGame/AddInSelector.cs +++ b/Samples/WindowsGame/AddInSelector.cs @@ -30,9 +30,9 @@ namespace WindowsGame1 foreach (IInputSystemCreator inputSystemCreator in AddInSystemFactory.Instance.GetCreators()) { - cbInputSystems.Items.Add(inputSystemCreator.Name); + cbInputSystem.Items.Add(inputSystemCreator.Name); } - cbInputSystems.SetItemChecked(0, true); + cbInputSystem.SelectedIndex = 0; foreach (ISoundSystemCreator soundSystemCreator in AddInSystemFactory.Instance.GetCreators()) { diff --git a/Samples/WindowsGame/Program.cs b/Samples/WindowsGame/Program.cs index ff722829..a7458281 100644 --- a/Samples/WindowsGame/Program.cs +++ b/Samples/WindowsGame/Program.cs @@ -21,7 +21,7 @@ namespace WindowsGame1 { AddInSystemFactory.Instance.PreferredRenderSystem = selector.cbRenderSystem.Text; AddInSystemFactory.Instance.PreferredSoundSystem = selector.cbAudioSystem.Text; - AddInSystemFactory.Instance.PreferredInputSystem = selector.cbInputSystems.CheckedItems[0].ToString(); + AddInSystemFactory.Instance.PreferredInputSystem = selector.cbInputSystem.Text; using (Game1 game = new Game1()) { diff --git a/Samples/WindowsGame/WindowsGame.csproj b/Samples/WindowsGame/WindowsGame.csproj index c62727fd..f0d64817 100644 --- a/Samples/WindowsGame/WindowsGame.csproj +++ b/Samples/WindowsGame/WindowsGame.csproj @@ -107,13 +107,17 @@ {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} ANX.InputSystem.Recording + + {49066074-3B7B-4A55-B122-6BD33AB73558} + ANX.InputSystem.Standard + {E5D69E75-D77C-493F-BBDA-6F9E73B82549} ANX.InputSystem.Windows.Kinect - + {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputSystem.Windows.XInput + ANX.InputDevices.Windows.XInput {5BE49183-2F6F-4527-AC90-D816911FCF90} diff --git a/build/ANX.Framework.build b/build/ANX.Framework.build index e5bf6d59..316dc5f3 100644 --- a/build/ANX.Framework.build +++ b/build/ANX.Framework.build @@ -9,12 +9,15 @@ - - - - + + + + + + + @@ -49,7 +52,7 @@ - + @@ -179,7 +182,7 @@ - + @@ -189,7 +192,7 @@ - + @@ -206,6 +209,20 @@ + + + + + + + + + + + + + +