Record Class InputEvent.GamepadPressed
java.lang.Object
java.lang.Record
dev.engine.core.input.InputEvent.GamepadPressed
- All Implemented Interfaces:
BooleanEvent, DeviceEvent, GamepadButtonEvent, InputEvent
- Enclosing interface:
InputEvent
public static record InputEvent.GamepadPressed(Time time, DeviceId device, GamepadButton button)
extends Record
implements GamepadButtonEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputEvent
InputEvent.CharTyped, InputEvent.CursorMoved, InputEvent.DeviceConnectionChanged, InputEvent.GamepadAxisMoved, InputEvent.GamepadPressed, InputEvent.GamepadReleased, InputEvent.KeyPressed, InputEvent.KeyReleased, InputEvent.KeyRepeated, InputEvent.MousePressed, InputEvent.MouseReleased, InputEvent.Scrolled -
Constructor Summary
ConstructorsConstructorDescriptionGamepadPressed(Time time, DeviceId device, GamepadButton button) Creates an instance of aGamepadPressedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbutton()Returns the value of thebuttonrecord component.device()Returns the value of thedevicerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanpressed()time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface GamepadButtonEvent
source
-
Constructor Details
-
GamepadPressed
Creates an instance of aGamepadPressedrecord class.- Parameters:
time- the value for thetimerecord componentdevice- the value for thedevicerecord componentbutton- the value for thebuttonrecord component
-
-
Method Details
-
pressed
public boolean pressed()- Specified by:
pressedin interfaceBooleanEvent
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
time
Returns the value of thetimerecord component.- Specified by:
timein interfaceInputEvent- Returns:
- the value of the
timerecord component
-
device
Returns the value of thedevicerecord component.- Specified by:
devicein interfaceDeviceEvent- Returns:
- the value of the
devicerecord component
-
button
Returns the value of thebuttonrecord component.- Specified by:
buttonin interfaceGamepadButtonEvent- Returns:
- the value of the
buttonrecord component
-