Interface IThemeButton
public interface IThemeButton
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.gui.components.ButtonGets the root button.Gets true if toggled, false if not.booleanisActive()Gets if the button is active, if enabled and toggledvoidsetDrawButton(boolean drawButton) Sets the button to draw or ot.voidsetEnabled(boolean enabled) Enables or disables the button.voidSets the on and off labelsvoidsetStaysOn(boolean staysOn) Sets so it cannot be toggled off.voidsetToggled(Boolean toggled) Sets the toggled to value.voidsetTooltip(String... tooltip) Sets tooltip.voidtoggle()Switch the toggle value.
-
Method Details
-
setToggled
Sets the toggled to value.- Parameters:
toggled- to toggle.
-
getToggled
Boolean getToggled()Gets true if toggled, false if not.- Returns:
- is toggled.
-
isActive
boolean isActive()Gets if the button is active, if enabled and toggled- Returns:
- if active.
-
toggle
void toggle()Switch the toggle value. -
setLabels
Sets the on and off labels- Parameters:
labelOn- - The on label.labelOff- - The off label.
-
getButton
net.minecraft.client.gui.components.Button getButton()Gets the root button.- Returns:
- - The root button.
-
setDrawButton
void setDrawButton(boolean drawButton) Sets the button to draw or ot.- Parameters:
drawButton- - To draw the button.
-
setStaysOn
void setStaysOn(boolean staysOn) Sets so it cannot be toggled off. Only works for ToggleTheme buttons. When toggled, it cannot be untoggled and becomes unclickable.- Parameters:
staysOn- - The stays on.
-
setEnabled
void setEnabled(boolean enabled) Enables or disables the button.- Parameters:
enabled- - To enable.
-
setTooltip
Sets tooltip. Can be a list of strings or i18n keys.- Parameters:
tooltip- the tooltip
-