Code Patterns
Copy-paste examples for common plugin tasks. Commands, events, ECS, GUI, and more.
All
225
Command
60
Damage
2
Ecs
27
Entity
5
Gui
75
Interaction
2
Inventory
4
Moderation
3
Permission
2
Player
9
Plugin
4
Storage
2
Teleport
3
Ui
22
Util
5
← Back to Patterns
java
gui
hytale-overriderespawnpointbutton
Official Hytale UI: OverrideRespawnPointButton with buttons with text elements
Example Code
$C = "../Common.ui";
$Sounds = "../Sounds.ui";
Button #Button {
@Sounds = $Sounds.@ButtonsLight;
Anchor: (Height: 50, Bottom: 4);
LayoutMode: Left;
Label #Name {
Style: (RenderBold: true, VerticalAlignment: Center, TextColor: #90a2b7);
FlexWeight: 2;
Padding: (Left: 14);
}
Label #Distance {
Style: (VerticalAlignment: Center, HorizontalAlignment: End, TextColor: #8698ad, FontSize: 14);
FlexWeight: 1;
}
Sprite #Icon {
Anchor: (Width: 40, Height: 40, Left: 7);
Padding: (Full: 5);
TexturePath: "RespawnPointArrow.png";
Frame: (Width: 32, Height: 32, PerRow: 1, Count: 1);
}
}
@DefaultRespawnButtonStyle = ButtonStyle(
Default: (Background: (TexturePath: "../Common/OptionBackgroundPatch.png", Border: 16)),
Hovered: (Background: (TexturePath: "../Common/OptionBackgroundPatch.png", Border: 16, Color: #ffffff(0.7))),
Pressed: (Background: (TexturePath: "../Common/OptionBackgroundPatch.png", Border: 16, Color: #ffffff(0.85))),
Disabled: (Background: (TexturePath: "../Common/OptionBackgroundPatch.png", Border: 16))
);
@SelectedRespawnButtonStyle = ButtonStyle(
Default: (Background: (TexturePath: "../Common/InputBoxSelected.png", Border: 16))
);