Template:Healthbar: Difference between revisions
imported>Denatidum No edit summary |
imported>Ttv pedro270707 mNo edit summary |
||
| (17 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{iconbar | <includeonly>{{iconbar | ||
|value={{{value|0}}} | |value={{{value|0}}} | ||
|size={{{size|18}}} | |size={{{size|18}}} | ||
|full=Heart.svg | |full=Heart.svg | ||
| Line 7: | Line 6: | ||
|empty=Empty_Heart.svg | |empty=Empty_Heart.svg | ||
|total={{{total|0}}} | |total={{{total|0}}} | ||
}} | |title={{{title|{{#expr: {{{value|0}}} / 2}} {{#ifeq: {{#expr: {{{value|0}}} / 2}} | 1 | heart | hearts }}}}} | ||
|alt=♥ | |||
}}</includeonly><noinclude> | |||
{{Documentation}} | |||
<!-- Put categories on the documentation page --> | |||
</noinclude> | |||
Latest revision as of 20:25, 25 March 2023
[view | | | ]Documentation
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}} |
[view | | | ]The above documentation is transcluded from Template:Healthbar/doc.