Class HytaleButtonDefinition

java.lang.Object
net.blueva.arcade.api.ui.menu.hytale.HytaleButtonDefinition
Record Components:
selector - the element selector in the layout (e.g. "#PlayButton")
text - the display text of the button
imageAsset - optional path to a texture asset relative to the plugin resource pack, or null
actions - the list of action commands to execute when clicked

public final class HytaleButtonDefinition extends Object
Defines a clickable button in a Hytale custom UI page.

Hytale buttons are elements in a .ui layout that the player can activate. They are referenced by their selector and bound to server-side actions via HytaleUIEventBinding.

Since:
3.2
  • Constructor Details

  • Method Details

    • selector

      public String selector()
    • text

      public String text()
    • imageAsset

      public String imageAsset()
    • actions

      public List<String> actions()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static HytaleButtonDefinition of(String selector, String text, List<String> actions)
      Creates a button without an image.
      Parameters:
      selector - the element selector
      text - the button text
      actions - the actions to execute
      Returns:
      a new HytaleButtonDefinition
    • of

      public static HytaleButtonDefinition of(String selector, String text, String imageAsset, List<String> actions)
      Creates a button with an image asset.
      Parameters:
      selector - the element selector
      text - the button text
      imageAsset - the image asset path
      actions - the actions to execute
      Returns:
      a new HytaleButtonDefinition