Popups

Popups are collections of elements (positioned assets) that are displayed together. These are different from layouts because they only last for the time that is specified in ticks.

Require Unique

This option is either true or false. If true, the popup will only display is there is not already an element displayed with the same arguments. This is useful for preventing duplicate messages.

Element

An element is a positioned asset on a popup.

Alignment

Whether the layer should align on the right, left, or center. The default alignment is right.

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

slot-1:
  asset: action-bar
  position:
    x: 50.0
    y: 0.0
  offset:
    x: 0
    y: 85

Example Popup

death-message:
  elements:
    kill-1:
      asset: death-message
      align: left
      position:
        x: 100.0
        y: 100.0
      offset:
        x: -20
        y: -20
    kill-2:
      asset: death-message
      align: left
      position:
        x: 100.0
        y: 100.0
      offset:
        x: -20
        y: -40
    kill-3:
      asset: death-message
      align: left
      position:
        x: 100.0
        y: 100.0
      offset:
        x: -20
        y: -60
    kill-4:
      asset: death-message
      align: left
      position:
        x: 100.0
        y: 100.0
      offset:
        x: -20
        y: -80
    kill-5:
      asset: death-message
      align: left
      position:
        x: 100.0
        y: 100.0
      offset:
        x: -20
        y: -100

Example Popup Asset

death-message:
  layers:
    icon:
      texture:
        scale: 0.5
        path: assets/death-message/icon.png
      offset:
        x: 86
        y: -2
    killer:
      text: "%arg-1%"
      font: "default"
      outlined: true
      align: left
      offset:
        x: 80
        y: -2
    victim:
      text: "%arg-2%"
      font: "default"
      outlined: true
      align: right
      offset:
        x: 100
        y: -2
    outline:
      texture:
        path: assets/death-message/outline.png

Sending a Popup

Sending a popup is as easy as sending a command.

Command Syntax

/happyhud popup <player> <popup> <ticks> <args separated by '|'>

Example Command

/happyhud popup Notch action-bar 60 Hello There Notch!

Last updated