Class AnimatedButton
java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.AnimatedButton
- All Implemented Interfaces:
Button
,Initializable
The animated button with child buttons as frames
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Button>
AnimatedButtonaddButton
(@NotNull Collection<@NotNull T> buttons) Add button(s)Add button(s)Display the buttonGet the list of buttonsvoid
init()
Initialize some properties for the objectsetPeriodMillis
(long periodMillis) Set the period of the animationsetPeriodTicks
(long periodTicks) Set the period of the animationvoid
stop()
Stop the object
-
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
-
display
Description copied from interface:Button
Display the button -
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object- Specified by:
init
in interfaceInitializable
-
stop
public void stop()Description copied from interface:Initializable
Stop the object- Specified by:
stop
in interfaceInitializable
-