Class PlatformMenuButton
java.lang.Object
net.dillon.dillonlib.platform.info.PlatformMenuButton
Stores menu button data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbutton()Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer()booleanbooleanstatic PlatformMenuButtonof(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton.static PlatformMenuButtonofEmpty(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, with anempty consumer.static PlatformMenuButtonpauseOnly(boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton, only possibly rendering on thepause screen.static PlatformMenuButtonpauseOnlyEmpty(boolean pauseCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, only possibly rendering on thepause screen, with anempty consumer.static voidsortButtons(List<PlatformMenuButton> buttons) Sorts platform menu buttons in a correct order.static PlatformMenuButtontitleOnly(boolean titleCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton, only possibly rendering on thetitle screen.static PlatformMenuButtontitleOnlyEmpty(boolean titleCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, only possibly rendering on thetitle screen, with anempty consumer.
-
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:
-
-
Method Details
-
of
public static PlatformMenuButton of(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton. -
ofEmpty
public static PlatformMenuButton ofEmpty(boolean titleCondition, boolean pauseCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, with anempty consumer. -
titleOnlyEmpty
public static PlatformMenuButton titleOnlyEmpty(boolean titleCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, only possibly rendering on thetitle screen, with anempty consumer. -
pauseOnlyEmpty
public static PlatformMenuButton pauseOnlyEmpty(boolean pauseCondition, UpdatableSpriteButton menuButton) Creates a newPlatformMenuButton, only possibly rendering on thepause screen, with anempty consumer. -
titleOnly
public static PlatformMenuButton titleOnly(boolean titleCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton, only possibly rendering on thetitle screen. -
pauseOnly
public static PlatformMenuButton pauseOnly(boolean pauseCondition, UpdatableSpriteButton menuButton, Consumer<net.minecraft.client.gui.components.SpriteIconButton> consumer) Creates a newPlatformMenuButton, only possibly rendering on thepause screen. -
isOnTitle
public boolean isOnTitle()- Returns:
- if the button can render on the
Title screen.
-
isOnPause
public boolean isOnPause()- Returns:
- if the button can render on the
Pause screen.
-
button
- Returns:
- the
menu button.
-
consumer
- Returns:
- the
consumerfor the menu button.
-
sortButtons
Sorts platform menu buttons in a correct order.
-