Provides a way to fetch the current input values from a Touch device.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities UpdateBehavior
DeltaEngine.Input InputDevice
DeltaEngine.Input Touch
DeltaEngine.Input.GLFW2 GLFWTouch
DeltaEngine.Input.GLFW3 GLFWTouch
DeltaEngine.Input.Mocks MockTouch
DeltaEngine.Input.SharpDX SharpDXTouch
DeltaEngine.Input.SlimDX SlimDXTouch
DeltaEngine.Input.Windows WindowsTouch
DeltaEngine.Input.Xna.Tests XnaMockTouch
DeltaEngine.Input.Xna XnaTouch
Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Touch type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Touch | Initializes a new instance of the Touch class |
Methods
Name | Description | |
---|---|---|
Dispose | (Inherited from InputDevice.) | |
GetPosition | ||
GetState | ||
Update | (Overrides UpdateBehavior Update(IEnumerable Entity ).) |
Properties
Name | Description | |
---|---|---|
IsAvailable | (Inherited from InputDevice.) |
Remarks
Examples
[Test] public void ShowRedCircleOnTouch() { new FontText(Font.Default, "Touch screen to show red circle", Rectangle.One); var ellipse = new Ellipse(new Rectangle(0.1f, 0.1f, 0.1f, 0.1f), Color.Red); new Command(() => ellipse.Center = Vector2D.Half).Add(new TouchDoubleTapTrigger()); new Command(() => ellipse.Center = Vector2D.Zero).Add(new TouchPressTrigger(State.Released)); }
[Test, CloseAfterFirstFrame] public void Create() { Assert.DoesNotThrow(() => new TouchDoubleTapTrigger()); }
[Test, CloseAfterFirstFrame] public void CreateFromAttributes() { Assert.DoesNotThrow(() => new TouchDoubleTapTrigger(new Dictionary<string, string>())); Assert.Throws<TouchDoubleTapTrigger.TouchDoubleTapTriggerHasNoParameters>( () => new TouchDoubleTapTrigger(new Dictionary<string, string> { { "Button", "Right" } })); }
See Also