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-memory
Official Hytale UI: Memory with buttons with text elements
Example Code
$C = "../../Common.ui";
$Sounds = "../../Sounds.ui";
Group {
Anchor: (Width: 144, Height: 176, Right: 16, Bottom: 16);
Padding: (Full: 0);
Group #EmptyBackground {
Visible: false;
Background: (TexturePath: "Tiles/TileEmpty.png", Border: 8);
TooltipText: %server.memories.general.undiscovered.tooltipText;
TextTooltipStyle: $C.@DefaultTextTooltipStyle;
}
TextButton #ButtonNotSelected {
Visible: false;
TextTooltipStyle: $C.@DefaultTextTooltipStyle;
Style: (
Sounds: $Sounds.@ButtonsLight,
Default: (
LabelStyle: (
Wrap: true,
HorizontalAlignment: Center,
VerticalAlignment: Center,
),
Background: (TexturePath: "Tiles/TileDefault.png", Border: 8),
),
Hovered: (
LabelStyle: (
Wrap: true,
HorizontalAlignment: Center,
VerticalAlignment: Center,
),
Background: (TexturePath: "Tiles/TileHovered.png", Border: 8),
)
);
FlexWeight: 1;
}
TextButton #ButtonSelected {
TextTooltipStyle: $C.@DefaultTextTooltipStyle;
Visible: false;
Style: (
Sounds: $Sounds.@ButtonsLight,
Default: (
LabelStyle: (
Wrap: true,
HorizontalAlignment: Center,
VerticalAlignment: Center,
),
Background: (TexturePath: "Tiles/TileSelected.png", Border: 8),
)
);
FlexWeight: 1;
}
Group {
LayoutMode: Middle;
Anchor: (Full: 0);
AssetImage #Icon {
Anchor: (Width: 128, Height: 128);
}
}
}