Comment on page

Layouts

Layouts are collections of elements (positioned assets) that are displayed together.

Element

An element is a positioned asset on a layout.

Alignment

Whether the layer should align on the right, left, or center. The default alignment is right.
Alignment Types
Right
Left
Center
align: center

Offset

If you would like to move a element around by pixels you would set the offset. Offset works through pixel perfect adjustments.

Position

The position of an element depends on the ScreenSize of the player. It works by percents so 50 = 50%. If you set x = 50 and y = 50 the element would be in the center of the screen. The percentages are precise to a single decimal space.

Example Element

health:
asset: 'vanilla-health'
align: center
position:
x: 50.0
y: 0
offset:
x: -49
y: 54

Example Layout

1
default-layout:
2
elements:
3
health:
4
asset: 'vanilla-health'
5
align: left
6
position:
7
x: 50.0
8
y: 0
9
offset:
10
x: -10
11
y: 55
12
food:
13
type: 'asset'
14
asset: 'vanilla-hunger'
15
align: right
16
position:
17
x: 50.0
18
y: 0.0
19
offset:
20
x: 10
21
y: 55
22
armor:
23
asset: 'vanilla-armor'
24
align: left
25
position:
26
x: 50.0
27
y: 0.0
28
offset:
29
x: -10
30
y: 65
31
air:
32
asset: 'vanilla-air'
33
align: right
34
position:
35
x: 50.0
36
y: 0.0
37
offset:
38
x: 10
39
y: 65