Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicHUD MythicHUD
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicHUDMythicHUD
  • Wiki
  • Layouts

Last edited by Brickgard Oct 03, 2024
Page history

Layouts

Layouts are a collection of positioned assets to be displayed together. These elements are arranged based on the viewer's screen height and width, to scale to any game window or GUI scale size.

Layouts are displayed to the player on an invisible Boss Bar, and can be toggled with the /hud layout Commands.

Pop-ups are configured the same as Layouts, however they are only shown to the player for a duration of time, rather than toggled on/off.

Arrangement

Alignment

Asset layers move in the direction of their alignment, from their start position:

align: left center right

Position

The position of the element relative to the screen size of the player. This uses values from 0 to 100 to represent the location percentage horizontally and vertically the asset's origin should be placed.

  position:
    x: 50
    y: 50

Example Positions

X Y Description
0 0 Absolute Lower Left
0 100 Absolute Upper Left
100 0 Absolute Lower Right
100 100 Absolute Upper Right
50 50 Center a.k.a. Crosshair
50 0 Center Bottom
50 100 Center Top

Positions are the starting origin for the offset pixel arrangement of an asset - these work together to provide consistent placement of assets in HUDs. For example, a position of x: 50 and y: 0 originates at the bottom center of the screen, usually the player's hotbar - so using an offset of y: 55 can ensure that a HUD is always bottom center, but pushed above the hotbar, regardless of screen or GUI scale size.

Offset

Pixel positioning to further move the asset's placement by a fixed amount from its position.

  offset:
    x: -5  # pixels left/right
    y: 2   # pixels up/down

Example

default-layout:
  elements:
    health:
      asset: 'vanilla-health'
      align: left
      position:
        x: 50.0
        y: 0
      offset:
        x: -10
        y: 55
    food:
      type: 'asset'
      asset: 'vanilla-hunger'
      align: right
      position:
        x: 50.0
        y: 0.0
      offset:
        x: 10
        y: 55
    armor:
      asset: 'vanilla-armor'
      align: left
      position:
        x: 50.0
        y: 0.0
      offset:
        x: -10
        y: 65
    air:
      asset: 'vanilla-air'
      align: right
      position:
        x: 50.0
        y: 0.0
      offset:
        x: 10
        y: 65
Clone repository
Home

Getting Started
What's New in MythicHUD?
Commands and Permissions
Configuration Reference

Layouts
Pop-Ups
HUD Components
  • Asset Layers
  • Assets
  • Listeners
  • Conditions
    • Effect
    • Gamemode
    • Placeholder
    • Progress
    • Logical Operators
Fonts

MythicHUD API
Compatibility
  • Migrating from v1 to v2
  • Supporting Multiple Client Versions
  • Crucible
  • Nexo
  • ItemsAdder
  • Modded Clients