mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-11-23 19:30:59 +00:00
b0d09b7fb7
Tweaked keyboard services, including how game port generates keys.
13 lines
490 B
C#
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; } }
|
|
}
|
|
}
|