Record Class NativeUiInput.ButtonEvent
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.screen.ui.NativeUiInput.ButtonEvent
- Enclosing class:
NativeUiInput
public static record NativeUiInput.ButtonEvent(int source, int target, int previous, int phase, boolean transition, int mode, NativeUiInput.Scope scope, boolean handleSelect, boolean handleDeselect)
extends Record
Retains the native raw phase; only phase one is a pressed controller event.
-
Constructor Summary
ConstructorsConstructorDescriptionButtonEvent(int source, int target, int previous, int phase, boolean transition, int mode, NativeUiInput.Scope scope, boolean handleSelect, boolean handleDeselect) Creates an instance of aButtonEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehandleDeselectrecord component.booleanReturns the value of thehandleSelectrecord component.final inthashCode()Returns a hash code value for this object.intmode()Returns the value of themoderecord component.intphase()Returns the value of thephaserecord component.booleanpressed()intprevious()Returns the value of thepreviousrecord component.scope()Returns the value of thescoperecord component.intsource()Returns the value of thesourcerecord component.inttarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetransitionrecord component.
-
Constructor Details
-
ButtonEvent
public ButtonEvent(int source, int target, int previous, int phase, boolean transition, int mode, NativeUiInput.Scope scope, boolean handleSelect, boolean handleDeselect) Creates an instance of aButtonEventrecord class.- Parameters:
source- the value for thesourcerecord componenttarget- the value for thetargetrecord componentprevious- the value for thepreviousrecord componentphase- the value for thephaserecord componenttransition- the value for thetransitionrecord componentmode- the value for themoderecord componentscope- the value for thescoperecord componenthandleSelect- the value for thehandleSelectrecord componenthandleDeselect- the value for thehandleDeselectrecord component
-
-
Method Details
-
pressed
public boolean pressed() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
source
public int source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
target
public int target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
previous
public int previous()Returns the value of thepreviousrecord component.- Returns:
- the value of the
previousrecord component
-
phase
public int phase()Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-
transition
public boolean transition()Returns the value of thetransitionrecord component.- Returns:
- the value of the
transitionrecord component
-
mode
public int mode()Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
handleSelect
public boolean handleSelect()Returns the value of thehandleSelectrecord component.- Returns:
- the value of the
handleSelectrecord component
-
handleDeselect
public boolean handleDeselect()Returns the value of thehandleDeselectrecord component.- Returns:
- the value of the
handleDeselectrecord component
-