|
|
|
### Arrangement
|
|
|
|
Pop-Ups inherit the Asset arrangement options of [Layouts](Layouts) - [Alignment](Layouts#alignment), [Positioning](Layouts#position), and [Offset](Layouts#offset) specifically.
|
|
|
|
### Slots
|
|
|
|
Pop-Ups can show multiple assets at once, stacking however the elements are arranged, to the max amount of elements you configure.
|
|
|
|
## 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.
|
|
|
|
### Sending a Popup
|
|
|
|
Sending a popup is as easy as sending a command:\
|
|
|
|
`/happyhud popup <player> <popup> <ticks> <args separated by '|'>`\
|
|
|
|
**Example Command:** `/happyhud popup Notch action-bar 60 Hello There Notch!`
|
|
|
|
### Example:
|
|
|
|
---
|
|
|
|
A PvP-focused "Death Message" pop-up that slots in the upper right of the screen:
|
|
|
|
##### Pop-Up Layout:
|
|
|
|
```yaml
|
|
|
|
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 and Asset Layers:
|
|
|
|
```yaml
|
|
|
|
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
|
|
|
|
``` |
|
|
|
\ No newline at end of file |