Class HytaleUIElement

java.lang.Object
net.blueva.arcade.api.ui.menu.hytale.HytaleUIElement
Record Components:
selector - the element selector in the layout (e.g. "#TitleLabel")
property - the property to set (e.g. "Text", "Visible")
defaultValue - the default value to set when the menu opens, or null

public final class HytaleUIElement extends Object
Represents a named element in a Hytale .ui layout whose value can be set from the server side.

Element selectors follow Hytale's UI DSL: identifiers prefixed with # target elements by ID, while other strings may target by type.

Since:
3.2
  • Constructor Details

    • HytaleUIElement

      public HytaleUIElement(String selector, String property, String defaultValue)
  • Method Details

    • selector

      public String selector()
    • property

      public String property()
    • defaultValue

      public String defaultValue()
    • 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
    • text

      public static HytaleUIElement text(String selector, String defaultValue)
      Creates a text element with a default value.
      Parameters:
      selector - the element selector
      defaultValue - the default text
      Returns:
      a new HytaleUIElement for the Text property
    • visibility

      public static HytaleUIElement visibility(String selector, boolean visible)
      Creates a visibility element.
      Parameters:
      selector - the element selector
      visible - whether the element should be visible by default
      Returns:
      a new HytaleUIElement for the Visible property