Difference between revisions of "Template:Ability icon/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
(Created page with "__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 them. See the Exa...")
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
==Description==
 
==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 them. See the Examples section below.
+
This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can resize them if needed. See the Examples section below.
  
 
==Syntax==
 
==Syntax==
 
<pre>
 
<pre>
{{Ability icon|<name>}}
+
{{Ability icon|<name>|<size selection>}}
 
</pre>
 
</pre>
  
Line 11: Line 11:
 
; <name>
 
; <name>
 
: The name of the ability. It must match exactly what is displayed in-game (e.g. "Super Fireball", not "SUPER fireball" or "Fireball")
 
: 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 ==  
 
== Examples ==  
  
=== Basic Use ===
+
=== Standard Use ===
<pre>{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}</pre>
+
<pre>
{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}
+
{{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|Ring of Fire}} <!-- default size is 64x64 -->
 +
 
 +
{{Ability icon|Ring of Fire|64}}
 +
 
 +
{{Ability icon|Ring of Fire|32}}
 +
</pre>
 +
{{Ability icon|Ring 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><span class="extimage32px">{{Ability icon|Regrowth}}</span></pre>
+
You can also manually resize the images if you wish (using the template just wraps the image in this span automatically).
<span class="extimage32px">{{Ability icon|Regrowth}}</span>
 
  
 +
<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>
 
<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]]

Latest revision as of 22:28, 30 September 2021

Description

This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can resize them if needed. See the Examples section below.

Syntax

{{Ability icon|<name>|<size selection>}}

Parameters

<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

Standard Use

{{Ability icon|Ring of Fire}}

{{Ability icon}}

{{Ability icon|FakeAbilityReturnsError}}

icon_2120.png

Item-icon-none.png

Error: Ability not found


Resizing

{{Ability icon|Ring of Fire}} <!-- default size is 64x64 -->

{{Ability icon|Ring of Fire|64}}

{{Ability icon|Ring of Fire|32}}

icon_2120.png

icon_2120.png

icon_2120.png


Alternative Resizing (old method)

You can also manually resize the images if you wish (using the template just wraps the image in this span automatically).

<span class="extimage32px">{{Ability icon|Ring of Fire}}</span>

<span class="extimage64px">{{Ability icon|Ring of Fire}}</span>

icon_2120.png

icon_2120.png