using UnityEngine.InputSystem.Layouts;
using UnityEngine.Scripting;
namespace UnityEngine.InputSystem.Controls
{
///
/// Delta controls are a two-dimensional motion vector that accumulate within a frame
/// and reset at the beginning of a frame. You can read the values from a delta control
/// using the inherited members from Vector2Control or InputControl.
///
///
///
[Preserve]
public class DeltaControl : Vector2Control
{
///
/// A synthetic axis representing the upper half of the Y axis value, i.e. the 0 to 1 range.
///
/// Control representing the control's upper half Y axis.
///
/// The control is marked as .
///
[InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Up")]
[Preserve]
public AxisControl up { get; set; }
///
/// A synthetic axis representing the lower half of the Y axis value, i.e. the 0 to -1 range (inverted).
///
/// Control representing the control's lower half Y axis.
///
/// The control is marked as .
///
[InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Down")]
[Preserve]
public AxisControl down { get; set; }
///
/// A synthetic axis representing the left half of the X axis value, i.e. the 0 to -1 range (inverted).
///
/// Control representing the control's left half X axis.
///
/// The control is marked as .
///
[InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Left")]
[Preserve]
public AxisControl left { get; set; }
///
/// A synthetic axis representing the right half of the X axis value, i.e. the 0 to 1 range.
///
/// Control representing the control's right half X axis.
///
/// The control is marked as .
///
[InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Right")]
[Preserve]
public AxisControl right { get; set; }
protected override void FinishSetup()
{
base.FinishSetup();
up = GetChildControl("up");
down = GetChildControl("down");
left = GetChildControl("left");
right = GetChildControl("right");
}
}
}