Record Class SettingsScreen.Button
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.guide.SettingsScreen.Button
- Enclosing class:
SettingsScreen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.neoforged.neoforge.common.ModConfigSpec.DoubleValueReturns the value of theconfigSpecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatincrease()Returns the value of theincreaserecord component.voidmouseClicked(double mouseX, double mouseY) voidmouseScrolled(double mouseX, double mouseY, double scroll) voidrender(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int width, int height, net.minecraft.client.gui.Font font) text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Button
public Button(net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec, int x, int y, String text, float increase) Creates an instance of aButtonrecord class.- Parameters:
configSpec- the value for theconfigSpecrecord componentx- the value for thexrecord componenty- the value for theyrecord componenttext- the value for thetextrecord componentincrease- the value for theincreaserecord component
-
-
Method Details
-
render
public void render(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int width, int height, net.minecraft.client.gui.Font font) -
mouseClicked
public void mouseClicked(double mouseX, double mouseY) -
mouseScrolled
public void mouseScrolled(double mouseX, double mouseY, double scroll) -
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. -
configSpec
public net.neoforged.neoforge.common.ModConfigSpec.DoubleValue configSpec()Returns the value of theconfigSpecrecord component.- Returns:
- the value of the
configSpecrecord 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
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
increase
public float increase()Returns the value of theincreaserecord component.- Returns:
- the value of the
increaserecord component
-