reckfellENGINE

InputEventJoypadButton

A digital controller-button event with an index and device.

On this page
class InputEventJoypadButtonReckfellSharpInherits InputEvent

ButtonIndex selects the logical button, Device selects the controller and Pressed describes the state transition. Prefer InputMap actions for rebindable controls; use a direct index when a particular button on a particular device is required.

Pressure is obsolete in the SDK and is not populated by the engine. Do not use it for analog trigger strength: axes use InputEventJoypadMotion. Button-event action matching has digital strength, 1 or 0.

See InputEventMouseButton for the complete device-filtering example. It does not simulate connecting a real controller.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

InputEventJoypadButtonConstructor
# InputEventJoypadButton
C#
public InputEventJoypadButton();

Creates an event without submitting it: button index 0, Pressed = false and initial stored pressure 0. Device is inherited from InputEvent; constructing the object does not connect a controller.

Properties3

ButtonIndexProperty
# ButtonIndex
C#
public JoyButton ButtonIndex { get; set; }

Logical JoyButton index in the event. Check Device separately to select a controller. The index is neither a device ID nor a universal physical button label.

PressedProperty
# Pressed
C#
public bool Pressed { get; set; }

Event press state; false represents release for an ordinary non-cancelled event. Button-to-action matching reports strength 1 for press and 0 for release, independent of stored Pressure.

PressureProperty · Deprecated
# Pressure
C#
public float Pressure { get; set; }

Obsolete in the installed C# SDK. The engine does not populate this field with button pressure; its ordinary value is 0. A programmatically stored float can be read, but it neither turns the button into an analog axis nor determines GetActionStrength. Use InputEventJoypadMotion for analog axes.

Methods5

GetButtonIndexJoyButton
# GetButtonIndex
C#
public JoyButton GetButtonIndex();

Returns ButtonIndex without polling the controller.

Returns JoyButton

Event JoyButton index.

GetPressurefloat
# GetPressure
C#
public float GetPressure();

Returns Pressure without polling the controller. The Pressure property is obsolete; do not use this value for analog input.

Returns float

Stored float, not engine-measured button pressure.

SetButtonIndexvoid
# SetButtonIndex
C#
public void SetButtonIndex(JoyButton buttonIndex);

Sets ButtonIndex using the property rules without submitting the event.

Parameters
NameTypeDefault
buttonIndexJoyButton—
buttonIndex

New ButtonIndex value.

SetPressedvoid
# SetPressed
C#
public void SetPressed(bool pressed);

Sets Pressed using the property rules without submitting the event.

Parameters
NameTypeDefault
pressedbool—
pressed

New Pressed value.

SetPressurevoid
# SetPressure
C#
public void SetPressure(float pressure);

Stores the supplied float without clamping. Does not obtain device pressure or change digital action strength; the Pressure property is obsolete.

Parameters
NameTypeDefault
pressurefloat—
pressure

New Pressure value.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.