Open main menu

Project: Gorgon Wiki β

Changes

Template:Ability icon/doc

750 bytes added, 23:28, 30 September 2021
m
no edit summary
__NOTOC__
==Description==
This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can use CSS to force or resize themif needed. See the Examples section below.
==Syntax==
<pre>
{{Ability icon|<name>|<size selection>}}
</pre>
; <name>
: The name of the ability. It must match exactly what is displayed in-game (e.g. "Super Fireball", not "SUPER fireball" or "Fireball")
: If omitted or empty, template returns a blank icon image.
: If no match is found, template returns an error.
 
; <size selection>
: 1 or 32 for 32x32.
: 2 or 64 for 64x64.
: If omitted, empty, or anything else, image isn't resized.
== Examples ==
=== Basic Standard Use ===<pre>{{Ability icon|Ring of Fire}} {{Ability icon}} {{Ability icon|FakeAbilityReturnsError}}</pre>{{Ability icon|Ring of Fire}} {{Ability icon}} {{Ability icon|FakeAbilityReturnsError}}  === Resizing ===<pre>{{Ability icon|RegrowthRing of Fire}} <!-- default size is 64x64 --> {{Ability icon|Ring of Fire|64}} {{Ability icon|Ring of Fire|32}}</pre>{{Ability icon|RegrowthRing of Fire}} <!-- default size is 64x64 --> {{Ability icon|Ring of Fire|64}} {{Ability icon|Ring of Fire|32}}
=== Forcing 32x32 size Alternative Resizing (old method) ===<pre><You can also manually resize the images if you wish (using the template just wraps the image in this span class="extimage32px">{{Ability icon|Regrowth}}</span></pre><span class="extimage32px">{{Ability icon|Regrowth}}</span>automatically).
<pre>
<span class="extimage32px">{{Ability icon|Ring of Fire}}</span>
=== Forcing 64x64 size ===
<pre><span class="extimage64px">{{Ability icon|Ring of Fire}}</span></pre>
<span class="extimage64px">{{Ability icon|Ring of Fire}}</span>
</pre>
<span class="extimage32px">{{Ability icon|Ring of Fire}}</span>
 
<span class="extimage64px">{{Ability icon|Ring of Fire}}</span>
 
[[Category:Template_documentation]]
1,690
edits