Code Patterns

Copy-paste examples for common plugin tasks. Commands, events, ECS, GUI, and more.

← Back to Patterns
gui

hytale-pluginlistbutton

Official Hytale UI: PluginListButton with buttons with text elements

Example Code

java
$C = "../Common.ui";

@LabelStyle = (
  Hovered: (
    Background: #000000(0.2),
  )
);

@SelectedLabelStyle = (
  Default: (
    LabelStyle: (RenderBold: true)
  ),
  Hovered: (
    LabelStyle: (RenderBold: true),
    Background: #000000(0.2)
  )
);

Group {
  Anchor: (Width: 340);
  LayoutMode: Left;

  TextButton #Button {
    Padding: (Full: 6);
    Style: @LabelStyle;
    FlexWeight: 1;
  }
  $C.@CheckBox #CheckBox {}
}