Using it

Widgets

A layout is a list of widgets in layout.yml. Edit it by hand or with the editor.

widgets:
  - id: health-bar
    type: bar
    anchor: bottom-center
    x: -50
    y: -31
    background: "hp_bg.png"
    fill: "hp_fill.png"
    fill-x: 1
    fill-y: 1
    value: "{health}"
    max: "{max_health}"
    steps: 40
    direction: "right"
    layer: 1
    visible:
      gamemode:
        - "SURVIVAL"
        - "ADVENTURE"

Position#

anchor is one of top-left, top-center, top-right, middle-left, center, middle-right, bottom-left, bottom-center, bottom-right. x and y are GUI units from the same point of the screen: +x right, +y down. For bottom anchors use a negative y to move up. A GUI unit is one pixel at GUI scale 1 (the game draws it 2 or 3 or 4 pixels wide at that GUI scale).

The types and their settings are listed in the next section: Widget settings.