Class AnimatedButton

java.lang.Object
io.github.projectunified.craftux.button.MultiButton
io.github.projectunified.craftux.button.AnimatedButton
All Implemented Interfaces:
Button, Element

public class AnimatedButton extends MultiButton
The animated button with child buttons as frames
  • Constructor Details

    • AnimatedButton

      public AnimatedButton()
  • Method Details

    • requireChildButtons

      protected boolean requireChildButtons()
      Description copied from class: MultiButton
      Whether to require child buttons
      Overrides:
      requireChildButtons in class MultiButton
      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: Element
      Stop the element. Should be called after removing from the GUI.
      Specified by:
      stop in interface Element
      Overrides:
      stop in class MultiButton
    • apply

      public boolean apply(@NotNull @NotNull UUID uuid, @NotNull @NotNull ActionItem actionItem)
      Description copied from interface: Button
      Apply actions to the action item
      Parameters:
      uuid - the uuid of the player
      actionItem - the action item
      Returns:
      true if any action was applied. Can return false in a conditional case (e.g. predicate button)