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-prefabspawnersettingspage
Official Hytale UI: PrefabSpawnerSettingsPage - Container layout with buttons with text elements
Example Code
$C = "../Common.ui";
$C.@PageOverlay {
LayoutMode: Middle;
$C.@DecoratedContainer {
Anchor: (Width: 532);
#Title {
$C.@Title {
@Text = %server.customUI.prefabSpawnerSettingsPage.title;
}
}
#Content {
LayoutMode: Top;
Padding: (Full: 16);
Label {
Anchor: (Bottom: 8);
Text: %server.customUI.prefabSpawnerSettingsPage.prefabPath;
Style: (...$C.@DefaultLabelStyle, RenderBold: true);
}
$C.@TextField #PrefabPath {
@Anchor = (Left: 0, Bottom: 8);
}
Label {
Anchor: (Bottom: 8);
Text: %server.customUI.prefabSpawnerSettingsPage.placementProperties;
Style: (...$C.@DefaultLabelStyle, RenderBold: true);
}
Group {
Anchor: (Bottom: 8);
$C.@CheckBoxWithLabel #FitHeightmap {
@Text = %server.customUI.prefabSpawnerSettingsPage.fitHeightmap;
@Checked = true;
}
}
Group {
Anchor: (Bottom: 8);
$C.@CheckBoxWithLabel #InheritSeed {
@Text = %server.customUI.prefabSpawnerSettingsPage.inheritSeed;
@Checked = true;
}
}
Group {
Anchor: (Bottom: 8);
$C.@CheckBoxWithLabel #InheritHeightCondition {
@Text = %server.customUI.prefabSpawnerSettingsPage.inheritHeightCondition;
@Checked = true;
}
}
Label {
Anchor: (Bottom: 8);
Text: %server.customUI.prefabSpawnerSettingsPage.defaultWeight;
Style: (...$C.@DefaultLabelStyle, RenderBold: true);
}
$C.@NumberField #DefaultWeight {
@Anchor = (Left: 0, Bottom: 8);
Format: (MaxDecimalPlaces: 3, Step: 0.1);
}
Label {
Anchor: (Bottom: 8);
Text: %server.customUI.prefabSpawnerSettingsPage.prefabWeights;
Style: (...$C.@DefaultLabelStyle, RenderBold: true);
}
$C.@TextField #PrefabWeights {
@Anchor = (Left: 0, Bottom: 8);
}
Group {
Anchor: (Vertical: 16, Height: 1);
Background: #5e512c;
}
$C.@TextButton #SaveButton {
Text: %server.customUI.saveChanges;
}
}
}
}
$C.@BackButton {}