Record Class ConfigEffect.WidgetContext
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcore.api.config.client.ConfigEffect.WidgetContext
- Enclosing interface:
- ConfigEffect
public static record ConfigEffect.WidgetContext(ConfigEffect.WidgetKind kind, int x, int y, int width, int height, boolean hovered, boolean focused, boolean active, ConfigEffect.Context screen)
extends Record
One widget, its bounds in GUI pixels as drawn, and its state.
-
Constructor Summary
ConstructorsConstructorDescriptionWidgetContext(ConfigEffect.WidgetKind kind, int x, int y, int width, int height, boolean hovered, boolean focused, boolean active, ConfigEffect.Context screen) Creates an instance of aWidgetContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfocused()Returns the value of thefocusedrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanhovered()Returns the value of thehoveredrecord component.kind()Returns the value of thekindrecord component.screen()Returns the value of thescreenrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
WidgetContext
public WidgetContext(ConfigEffect.WidgetKind kind, int x, int y, int width, int height, boolean hovered, boolean focused, boolean active, ConfigEffect.Context screen) Creates an instance of aWidgetContextrecord class.- Parameters:
kind- the value for thekindrecord componentx- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componenthovered- the value for thehoveredrecord componentfocused- the value for thefocusedrecord componentactive- the value for theactiverecord componentscreen- the value for thescreenrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
hovered
public boolean hovered()Returns the value of thehoveredrecord component.- Returns:
- the value of the
hoveredrecord component
-
focused
public boolean focused()Returns the value of thefocusedrecord component.- Returns:
- the value of the
focusedrecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
screen
Returns the value of thescreenrecord component.- Returns:
- the value of the
screenrecord component
-