Class AnimatedButton
java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.AnimatedButton
- All Implemented Interfaces:
Button,me.hsgamer.hscore.ui.property.IdentifiedUpdatable,me.hsgamer.hscore.ui.property.Initializable
public class AnimatedButton
extends Object
implements Button, me.hsgamer.hscore.ui.property.IdentifiedUpdatable
The animated button with child buttons as frames
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Button>
AnimatedButtonaddButton(@NotNull Collection<@NotNull T> buttons) Add button(s)Add button(s)booleanforceSetAction(@NotNull UUID uuid) Get the list of buttonsvoidhandleAction(ClickEvent event) voidinit()setPeriodMillis(long periodMillis) Set the period of the animationsetPeriodTicks(long periodTicks) Set the period of the animationvoidstop()void
-
Constructor Details
-
AnimatedButton
public AnimatedButton()
-
-
Method Details
-
setPeriodMillis
Set the period of the animation- Parameters:
periodMillis- the period in milliseconds- Returns:
- this instance
-
setPeriodTicks
Set the period of the animation- Parameters:
periodTicks- the period in ticks- Returns:
- this instance
-
addButton
@Contract("_ -> this") public <T extends Button> AnimatedButton addButton(@NotNull @NotNull Collection<@NotNull T> buttons) Add button(s)- Type Parameters:
T- the type of the button- Parameters:
buttons- the buttons (or frames)- Returns:
- this instance
-
addButton
Add button(s)- Parameters:
button- the button (or frame)- Returns:
- this instance
-
getButtons
Get the list of buttons- Returns:
- the buttons
-
getItem
-
handleAction
- Specified by:
handleActionin interfaceButton
-
forceSetAction
- Specified by:
forceSetActionin interfaceButton
-
init
public void init()- Specified by:
initin interfaceme.hsgamer.hscore.ui.property.Initializable
-
stop
public void stop()- Specified by:
stopin interfaceme.hsgamer.hscore.ui.property.Initializable
-
update
- Specified by:
updatein interfaceme.hsgamer.hscore.ui.property.IdentifiedUpdatable
-