... | ... | @@ -20,18 +20,18 @@ flowchart TD |
|
|
```
|
|
|
This looks like a lot, but we'll break each level down!
|
|
|
|
|
|
### [Listeners](HUD-Components/Listeners)
|
|
|
### [Listeners](Listeners)
|
|
|
Listeners are what "power" HUDs, bringing in the stats to compare and display. They provide text for functional text placeholders, and provide the numbers to compare to decide how full a stat display bar should be.
|
|
|
The `default-layout` HUD has great examples of this, using some built-in listeners to hook right into some core gameplay stats.
|
|
|
The `sword-layout` HUD shows an example of using a custom listener, `mana`
|
|
|
### [Asset Layers](HUD-Components/Asset-Layers)
|
|
|
### [Asset Layers](Components/Asset-Layers)
|
|
|
Asset layers are the individual pieces that come together to make a finished asset; things like icons, text, and stat bars. The order of these layers a HUD Asset determines their the order they visually stack in. The first Asset Layers are on top, the lowest/last ones are on the bottom.\
|
|
|
This is why the default assets tend to layer as `icon` > `fill` > `outline`, putting the bar's main frame in the back, it's fill before that, and the icon on top. Those asset layers then assemble the finished asset.
|
|
|
### [Assets](HUD-Components/Assets)
|
|
|
### [Assets](Components/Assets)
|
|
|
These are the "building blocks" of a HUD layout. Various assets are arranged together to build a HUD. This modular approach allows for various screen and GUI scale sizes of players to move asset layers around the screen proportionally, without rearranging the pieces of those assets.\
|
|
|
i.e. The icon and bar Asset Layers of an asset won't separate if a player's screen is wider than another's, but two Assets of a HUD layout may move further apart on a wider screen.
|
|
|
|
|
|
The `default-layout` is built out of four assets - the health bar, hunger bar, armor bar and oxygen bar. The `sword-layout` is a single asset positioned in the upper-left of the screen.
|
|
|
### [HUD Layouts](HUD-Components/Layouts)
|
|
|
### [HUD Layouts](Layouts)
|
|
|
And finally, the Asset pieces come together to create a HUD! A HUD's layout is built out of Asset elements, arranged based on screen percentages and offsets. This layout is what can be toggled for players in-game to see the various Asset bars, stats and icons all come together!
|
|
|
[Pop-Ups](Pop-Ups) are assembled the same as Layouts, they just have the feature to be temporarily enabled for a duration, compared to layouts just being a toggle on/off. |
|
|
\ No newline at end of file |