Click or drag to resize

ControllerButton Class

A Button controller element.
Inheritance Hierarchy
SystemObject
  RewiredControllerElement
    RewiredControllerButton

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class Button : ControllerElement

The ControllerButton type exposes the following members.

Properties
  NameDescription
Public propertycompoundElement
Returns the Compound Element parent of this element if any. Returns null if this Element is not a member of a Compound Element.
(Inherited from ControllerElement.)
Public propertydoublePressedAndHeld
Was this button double pressed and then held? Returns true until released.
Public propertyelementIdentifier
The controller element identifier.
(Inherited from ControllerElement.)
Public propertyisMemberElement
Returns True if the element is a member of a compound element such as an Axis2D.
(Inherited from ControllerElement.)
Public propertyisPressureSensitive
Is this button pressure sensitive?
Public propertyjustChangedState
Returns true if the button was just pressed or just released. Returns true for only one frame.
Public propertyjustDoublePressed
Was this button just double pressed this frame? Returns true for only one frame.
Public propertyjustPressed
Was this button just pressed this frame? Returns true for only one frame. Functions the same as GetButtonDown.
Public propertyjustReleased
Was this button just released this frame? Returns true for only one frame. Functions the same as GetButtonUp.
Public propertylastTimePressed
Gets the last time the button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
Public propertylastTimeStateChanged
Gets the last time the button changed state. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
Public propertylastTimeUnpressed
Gets the last time the button was inactive. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
Public propertypressure
The current pressure on the button. [0.0 - 1.0]
Public propertypressurePrev
The pressure on the button in the previous frame. [0.0 - 1.0]
Public propertytimePressed
The time in seconds this button has been active.
Public propertytimeUnpressed
The time in seconds this button has been inactive.
Public propertyvalue
The current state of the button.
Public propertyvaluePrev
The state of the button in the previous frame
Top
Methods
  NameDescription
Public methodDoublePressedAndHeld
Was this button double pressed and then held? Returns true until released. Required double press speed in seconds for a double press to be registered.

Return Value

Type: 
Boolean
Public methodJustDoublePressed
Was this button just double pressed this frame? Returns true for only one frame. Required double press speed in seconds for a double press to be registered.

Return Value

Type: 
Boolean
Public methodReset (Inherited from ControllerElement.)
Top
Fields
See Also