Class AnimatedButton
java.lang.Object
io.github.projectunified.craftux.button.MultiButton
io.github.projectunified.craftux.button.AnimatedButton
The animated button with child buttons as frames
-
Field Summary
Fields inherited from class io.github.projectunified.craftux.button.MultiButton
buttons -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(@NotNull UUID uuid, @NotNull ActionItem actionItem) Apply actions to the action itemvoidsetPeriodMillis(long periodMillis) Set the period of the animationvoidstop()Stop the element.Methods inherited from class io.github.projectunified.craftux.button.MultiButton
addButton, addButton, getButtons, init
-
Constructor Details
-
AnimatedButton
public AnimatedButton()
-
-
Method Details
-
setPeriodMillis
public void setPeriodMillis(long periodMillis) Set the period of the animation- Parameters:
periodMillis- the period in milliseconds
-
stop
public void stop()Description copied from interface:ElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceElement- Overrides:
stopin classMultiButton
-
apply
Description copied from interface:ButtonApply actions to the action item- Parameters:
uuid- the uuid of the playeractionItem- the action item- Returns:
- true if any action was applied. Can return false in a conditional case (e.g. predicate button)
-