Class AnimatedButton
java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.MultiButton
me.hsgamer.hscore.minecraft.gui.button.AnimatedButton
- All Implemented Interfaces:
Function<@NotNull InventoryContext,,@Nullable ActionItem> GUIElement
The animated button with child buttons as frames
-
Field Summary
Fields inherited from class me.hsgamer.hscore.minecraft.gui.button.MultiButton
buttons -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ActionItemapply(@NotNull InventoryContext context) protected booleanWhether to require child buttonsvoidsetPeriodMillis(long periodMillis) Set the period of the animationvoidstop()Stop the element.Methods inherited from class me.hsgamer.hscore.minecraft.gui.button.MultiButton
addButton, addButton, getButtons, init
-
Constructor Details
-
AnimatedButton
public AnimatedButton()
-
-
Method Details
-
requireChildButtons
protected boolean requireChildButtons()Description copied from class:MultiButtonWhether to require child buttons- Overrides:
requireChildButtonsin classMultiButton- Returns:
- true if child buttons are required
-
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:GUIElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceGUIElement- Overrides:
stopin classMultiButton
-
apply
-