Record Class GuiMouseEvent
java.lang.Object
java.lang.Record
dev.boze.api.gui.input.GuiMouseEvent
- Record Components:
- GLFW mouse buttonmodifiers- GLFW modifier bitsdoubleClick- Whether this press completes a double click
public record GuiMouseEvent(double x, double y, int button, int modifiers, boolean doubleClick)
extends Record
A mouse press or release in GUI-scaled pixels.
-
Constructor Summary
ConstructorsConstructorDescriptionGuiMouseEvent(double x, double y, int button, int modifiers, boolean doubleClick) Creates an instance of aGuiMouseEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbutton()Returns the value of thebuttonrecord component.booleanReturns the value of thedoubleClickrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisLeft()booleanisMiddle()booleanisRight()intReturns the value of themodifiersrecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
GuiMouseEvent
public GuiMouseEvent(double x, double y, int button, int modifiers, boolean doubleClick) Creates an instance of aGuiMouseEventrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentbutton- the value for thebuttonrecord componentmodifiers- the value for themodifiersrecord componentdoubleClick- the value for thedoubleClickrecord component
-
-
Method Details
-
isLeft
public boolean isLeft() -
isRight
public boolean isRight() -
isMiddle
public boolean isMiddle() -
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 with thecomparemethod from their corresponding wrapper classes. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
button
-
modifiers
-
doubleClick
public boolean doubleClick()Returns the value of thedoubleClickrecord component.- Returns:
- the value of the
doubleClickrecord component
-