Template:Healthbar: Difference between revisions

From BTA-Mirror
imported>Denatidum
No edit summary
imported>Ttv pedro270707
m (Added documentation)
Line 1: Line 1:
{{iconbar
<includeonly>{{iconbar
|value={{{value|0}}}
|value={{{value|0}}}
|size={{{size|18}}}
|size={{{size|18}}}
Line 6: Line 6:
|empty=Empty_Heart.svg
|empty=Empty_Heart.svg
|total={{{total|0}}}
|total={{{total|0}}}
}}
}}</includeonly><noinclude>
{{Documentation}}
<!-- Put categories on the documentation page -->
</noinclude>

Revision as of 12:59, 19 March 2023

[view | edit | history | purge]Documentation

This template implements a Minecraft-like health bar.

Arguments

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

Code Result
{{healthbar}} File:Empty Heart.svg
{{healthbar|size=9}} File:Empty Heart.svg
{{healthbar|value=1}} File:Half Heart.svg
{{healthbar|value=2}}
{{healthbar|value=5}} File:Half Heart.svg
{{healthbar|value=5|total=10}} File:Half Heart.svgFile:Empty Heart.svgFile:Empty Heart.svg
{{healthbar|value=7|size=45}} File:Half Heart.svg
[view | edit | history | purge]The above documentation is transcluded from Template:Healthbar/doc.