2012-08-09 09:45:04 +00:00
|
|
|
#region Using Statements
|
2012-01-20 15:17:50 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using ANX.Framework.NonXNA;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2012-01-20 15:17:50 +00:00
|
|
|
|
|
|
|
namespace ANX.InputDevices.Test
|
|
|
|
{
|
|
|
|
public class Creator:IInputSystemCreator
|
|
|
|
{
|
|
|
|
private Mouse _mouse;
|
|
|
|
private Keyboard _keyboard;
|
|
|
|
private GamePad _gamePad;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IGamePad GamePad
|
|
|
|
{
|
|
|
|
get
|
2012-02-15 19:48:46 +00:00
|
|
|
{
|
|
|
|
AddInSystemFactory.Instance.PreventSystemChange(
|
|
|
|
AddInType.InputSystem);
|
2012-01-20 15:17:50 +00:00
|
|
|
if (_gamePad == null)
|
|
|
|
{
|
|
|
|
_gamePad = new GamePad();
|
|
|
|
}
|
|
|
|
return _gamePad;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public IMouse Mouse
|
|
|
|
{
|
|
|
|
get
|
2012-02-15 19:48:46 +00:00
|
|
|
{
|
|
|
|
AddInSystemFactory.Instance.PreventSystemChange(
|
|
|
|
AddInType.InputSystem);
|
2012-01-20 15:17:50 +00:00
|
|
|
if (_mouse == null)
|
|
|
|
{
|
|
|
|
_mouse = new Mouse();
|
|
|
|
}
|
|
|
|
return _mouse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public IKeyboard Keyboard
|
|
|
|
{
|
|
|
|
get
|
2012-02-15 19:48:46 +00:00
|
|
|
{
|
|
|
|
AddInSystemFactory.Instance.PreventSystemChange(
|
|
|
|
AddInType.InputSystem);
|
2012-01-20 15:17:50 +00:00
|
|
|
if (_keyboard == null)
|
|
|
|
{
|
|
|
|
_keyboard = new Keyboard();
|
|
|
|
}
|
|
|
|
return _keyboard;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public IMotionSensingDevice MotionSensingDevice
|
|
|
|
{
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
}
|
|
|
|
|
|
|
|
public void RegisterCreator(AddInSystemFactory factory)
|
|
|
|
{
|
|
|
|
factory.AddCreator(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
{
|
|
|
|
get { return "Test"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public int Priority
|
|
|
|
{
|
|
|
|
get { return int.MaxValue; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsSupported
|
|
|
|
{
|
|
|
|
get { return true; } //This is just for test, so it runs on all plattforms
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|