Template:Armorbar

From BTA-Mirror
Revision as of 20:07, 19 March 2023 by imported>Denatidum (Created page with "<includeonly>{{iconbar |value={{{value|0}}} |size={{{size|18}}} |full=Armor.svg |half=Half_Armor.svg |empty=Empty_Armor.svg |total={{{total|0}}} |title={{#expr: {{{value|0}}} / 2}} {{#ifeq: {{#expr: {{{value|0}}} / 2}} | 1 | armor point | armor points }} }}</includeonly><noinclude> {{Documentation}} <!-- Put categories on the documentation page --> </noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
[view | edit | history | purge]Documentation

This template implements a Minecraft-like armor bar.

Arguments

Argument Default value Note
size 18 Sets the size of each armor point.
value 0 Sets the amount of armor points.
total 0 Sets the total amount of armor points. Use if empty armor points are needed after the filled armor points.

Usage

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