Class MultiButton
java.lang.Object
io.github.projectunified.craftux.button.MultiButton
- Direct Known Subclasses:
AnimatedButton
,ListButton
A base button that handles multiple child buttons
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Add child buttonsfinal <T extends Button>
voidaddButton
(@NotNull Collection<@NotNull T> buttons) Add child buttonsGet the list of child buttonsvoid
init()
Initialize the element.protected boolean
Whether to require child buttonsvoid
stop()
Stop the element.
-
Field Details
-
buttons
-
-
Constructor Details
-
MultiButton
public MultiButton()
-
-
Method Details
-
requireChildButtons
protected boolean requireChildButtons()Whether to require child buttons- Returns:
- true if child buttons are required
-
addButton
Add child buttons- Type Parameters:
T
- the type of the button- Parameters:
buttons
- the child buttons
-
addButton
Add child buttons- Parameters:
button
- the button
-
getButtons
Get the list of child buttons- Returns:
- the list of child buttons
-
init
public void init()Description copied from interface:Element
Initialize the element. Should be called before adding to the GUI. -
stop
public void stop()Description copied from interface:Element
Stop the element. Should be called after removing from the GUI.
-