Virtu/Library/Xna/TouchButton.cs
Sean Fausett b0d09b7fb7 Added touch input support to XNA build.
Tweaked keyboard services, including how game port generates keys.
2011-01-08 00:55:17 +13:00

13 lines
490 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input.Touch;
namespace Jellyfish.Library
{
public sealed class TouchButton : TouchRegion
{
public bool HasValue { get { return Touch.HasValue; } }
public bool IsButtonDown { get { var touch = Touch.Value; return ((touch.State == TouchLocationState.Pressed) || (touch.State == TouchLocationState.Moved)); } }
public Vector2 Position { get { return Touch.Value.Position; } }
}
}