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 TypeMethodDescriptionboolean
apply
(@NotNull UUID uuid, @NotNull ActionItem actionItem) Apply actions to the action itemvoid
setPeriodMillis
(long periodMillis) Set the period of the animationvoid
stop()
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:Element
Stop the element. Should be called after removing from the GUI.- Specified by:
stop
in interfaceElement
- Overrides:
stop
in classMultiButton
-
apply
Description copied from interface:Button
Apply 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)
-