2011-11-04 23:51:05 +00:00
|
|
|
using System;
|
|
|
|
using ANX.Framework.NonXNA;
|
2012-09-01 16:20:44 +00:00
|
|
|
using ANX.Framework.NonXNA.Development;
|
2011-11-04 23:51:05 +00:00
|
|
|
|
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
|
2011-11-04 23:06:39 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Input
|
|
|
|
{
|
2012-10-16 20:41:17 +00:00
|
|
|
[PercentageComplete(100)]
|
|
|
|
[Developer("AstrorEnales")]
|
2012-09-01 16:20:44 +00:00
|
|
|
[TestState(TestStateAttribute.TestState.Tested)]
|
2011-11-04 23:06:39 +00:00
|
|
|
public static class Mouse
|
|
|
|
{
|
2012-09-30 07:43:41 +00:00
|
|
|
private static readonly IMouse mouse;
|
2012-09-01 16:20:44 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static IntPtr WindowHandle
|
|
|
|
{
|
|
|
|
get { return mouse.WindowHandle; }
|
|
|
|
set { mouse.WindowHandle = value; }
|
|
|
|
}
|
2011-11-04 23:51:05 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
static Mouse()
|
2011-11-04 23:51:05 +00:00
|
|
|
{
|
2011-11-11 15:21:41 +00:00
|
|
|
mouse = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().Mouse;
|
2011-11-04 23:51:05 +00:00
|
|
|
}
|
|
|
|
|
2011-11-04 23:06:39 +00:00
|
|
|
public static MouseState GetState()
|
|
|
|
{
|
2012-09-30 07:43:41 +00:00
|
|
|
return mouse.GetState();
|
2011-11-04 23:06:39 +00:00
|
|
|
}
|
2011-11-09 12:31:32 +00:00
|
|
|
|
2011-11-04 23:06:39 +00:00
|
|
|
public static void SetPosition(int x, int y)
|
|
|
|
{
|
2012-09-30 07:43:41 +00:00
|
|
|
mouse.SetPosition(x, y);
|
2011-11-04 23:06:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|