Template:Healthbar/doc: Difference between revisions

imported>Ttv pedro270707
m (Accidentally left a health bar in the introductory text)
imported>Ttv pedro270707
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 10: Line 10:
|-
|-
| <code>total</code> || <code>0</code> || Sets the total amount of hearts. Use if empty hearts are needed after the filled hearts.
| <code>total</code> || <code>0</code> || Sets the total amount of hearts. Use if empty hearts are needed after the filled hearts.
|-
| <code>title</code> || <code>value / 2</code> heart(s) || Sets the title that displays on mouse hover.
|}
|}


Line 30: Line 32:
| <code><nowiki>{{healthbar|value=7|size=45}}</nowiki></code> || {{healthbar|value=7|size=45}}
| <code><nowiki>{{healthbar|value=7|size=45}}</nowiki></code> || {{healthbar|value=7|size=45}}
|}
|}
[[Category:Image templates]]

Latest revision as of 21:07, 25 March 2023

This template implements a Minecraft-like health bar.

Arguments Edit

Argument Default value Note
size 18 Sets the size of each heart.
value 0 Sets the amount of hearts.
total 0 Sets the total amount of hearts. Use if empty hearts are needed after the filled hearts.
title value / 2 heart(s) Sets the title that displays on mouse hover.

Usage Edit

Code Result
{{healthbar}}
{{healthbar|size=9}}
{{healthbar|value=1}}
{{healthbar|value=2}} ♥
{{healthbar|value=5}} ♥♥
{{healthbar|value=5|total=10}} ♥♥
{{healthbar|value=7|size=45}} ♥♥♥