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 buttonimageAsset- optional path to a texture asset relative to the plugin resource pack, ornullactions- the list of action commands to execute when clicked
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()booleaninthashCode()static HytaleButtonDefinitionCreates a button with an image asset.static HytaleButtonDefinitionCreates a button without an image.selector()text()toString()
-
Constructor Details
-
HytaleButtonDefinition
-
-
Method Details
-
selector
-
text
-
imageAsset
-
actions
-
equals
-
hashCode
public int hashCode() -
toString
-
of
Creates a button without an image.- Parameters:
selector- the element selectortext- the button textactions- 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 selectortext- the button textimageAsset- the image asset pathactions- the actions to execute- Returns:
- a new HytaleButtonDefinition
-