Struct TouchPanelState
Represents the state of the touch panel.
Implements
Inherited Members
Namespace: Evergine.Common.Input
Assembly: Evergine.Common.dll
Syntax
public struct TouchPanelState : IController, IList<TouchLocation>, ICollection<TouchLocation>, IEnumerable<TouchLocation>, IEnumerable
  Constructors
TouchPanelState(TouchLocation[])
Initializes a new instance of the TouchPanelState struct.
Declaration
public TouchPanelState(TouchLocation[] touches)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TouchLocation[] | touches | The touches.  | 
      
Fields
MaxTouches
Maximum number of touches.
Declaration
public const int MaxTouches = 16
  Field Value
| Type | Description | 
|---|---|
| int | 
Properties
Count
Gets the count.
Declaration
public int Count { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
IsConnected
Gets or sets a value indicating whether this instance is connected.
Declaration
public bool IsConnected { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
  | 
      
IsReadOnly
Gets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
  | 
      
this[int]
Gets or sets the TouchLocation at the specified index.
Declaration
public TouchLocation this[int index] { get; set; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | index | Touch index.  | 
      
Property Value
| Type | Description | 
|---|---|
| TouchLocation | The result.  | 
      
Methods
AddTouchLocation(int, TouchLocationState, float, float)
Adds the touch location.
Declaration
[Obsolete("Use AddTouchLocation(int id, float x, float y) instead")]
public void AddTouchLocation(int id, TouchLocationState state, float x, float y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
| TouchLocationState | state | The touch state.  | 
      
| float | x | The x.  | 
      
| float | y | The y.  | 
      
AddTouchLocation(int, float, float)
Adds the touch location.
Declaration
public void AddTouchLocation(int id, float x, float y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
| float | x | The x.  | 
      
| float | y | The y.  | 
      
Clear()
Clears this instance.
Declaration
public void Clear()
  Contains(TouchLocation)
Determines whether [contains] [the specified item].
Declaration
public bool Contains(TouchLocation item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TouchLocation | item | The item.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
Contains(int)
Determines whether [contains] [the specified id].
Declaration
public bool Contains(int id)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
CopyTo(TouchLocation[], int)
Copies to.
Declaration
public void CopyTo(TouchLocation[] array, int arrayIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TouchLocation[] | array | The array.  | 
      
| int | arrayIndex | Index of the array.  | 
      
GetEnumerator()
Gets the enumerator.
Declaration
public TouchPanelState.Enumerator GetEnumerator()
  Returns
| Type | Description | 
|---|---|
| TouchPanelState.Enumerator | The result.  | 
      
IndexOf(TouchLocation)
Indexes the of.
Declaration
public int IndexOf(TouchLocation touch)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TouchLocation | touch | The touch.  | 
      
Returns
| Type | Description | 
|---|---|
| int | The result.  | 
      
ModifyTouch(int, TouchLocationState, float, float)
Modifies the touch.
Declaration
public void ModifyTouch(int id, TouchLocationState newState, float newX, float newY)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
| TouchLocationState | newState | The new state.  | 
      
| float | newX | The new X.  | 
      
| float | newY | The new Y.  | 
      
RemoveTouchLocation(int)
Adds the touch location.
Declaration
public void RemoveTouchLocation(int id)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
TryGetTouch(int, out TouchLocation)
Tries the get touch.
Declaration
public bool TryGetTouch(int id, out TouchLocation touchLocation)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | id | The id.  | 
      
| TouchLocation | touchLocation | The touch location.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | The result.  | 
      
Update()
Clears this instance.
Declaration
public void Update()