Record Class PlatformMenuButton
java.lang.Object
java.lang.Record
net.dillon.dillonlib.platform.info.PlatformMenuButton
public record PlatformMenuButton(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer)
extends Record
Stores menu button data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionPlatformMenuButton(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates an instance of aPlatformMenuButtonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionConsumer<net.minecraft.client.gui.components.SpriteIconButton> consumer()Returns the value of theconsumerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themenuButtonrecord component.booleanReturns the value of thepauseConditionrecord component.static voidsortButtons(List<PlatformMenuButton> buttons) Sorts platform menu buttons in a correct order.booleanReturns the value of thetitleConditionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TITLE_SCREEN_BUTTON_CAP
public static final int TITLE_SCREEN_BUTTON_CAP- See Also:
-
PAUSE_SCREEN_BUTTON_CAP
public static final int PAUSE_SCREEN_BUTTON_CAP- See Also:
-
-
Constructor Details
-
PlatformMenuButton
public PlatformMenuButton(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates an instance of aPlatformMenuButtonrecord class.- Parameters:
titleCondition- the value for thetitleConditionrecord componentpauseCondition- the value for thepauseConditionrecord componentmenuButton- the value for themenuButtonrecord componentconsumer- the value for theconsumerrecord component
-
-
Method Details
-
sortButtons
Sorts platform menu buttons in a correct order. -
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. -
titleCondition
public boolean titleCondition()Returns the value of thetitleConditionrecord component.- Returns:
- the value of the
titleConditionrecord component
-
pauseCondition
public boolean pauseCondition()Returns the value of thepauseConditionrecord component.- Returns:
- the value of the
pauseConditionrecord component
-
consumer
Returns the value of theconsumerrecord component.- Returns:
- the value of the
consumerrecord component
-