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

From Project: Gorgon Wiki
Jump to: navigation, search
m
m
Line 33: Line 33:
 
<pre><span class="extimage64px">{{Item icon|Ice Core}}</span></pre>
 
<pre><span class="extimage64px">{{Item icon|Ice Core}}</span></pre>
 
<span class="extimage64px">{{Item icon|Ice Core}}</span>
 
<span class="extimage64px">{{Item icon|Ice Core}}</span>
 +
 +
[[Category:Template_documentation]]

Revision as of 15:00, 22 May 2021

Description

This accepts an item name as input and returns the in-game icon. This is not specifically a function of this template, but you can then use CSS to resize the icon to 16x16, 32x32, or 64x64. Remember that you may lose image quality, see the 64x64 Ice Core in the Examples section below.

Syntax

{{Item icon|<name>}}

Parameters

<name>
The name of the item. It must match exactly what is displayed in-game (e.g. "Red Apple", not "Apple" or "red apple")
If omitted or empty, template returns a blank icon image.
If no match is found, template returns an error.

Examples

Standard Use

{{Item icon|Glowy Yellow Crystal}} {{Item icon|Ice Core}}

{{Item icon}} {{Item icon|FakeItemReturnsError}}

icon_5702.png icon_5295.png

Item-icon-none.png Error: Item not found


Forcing 32x32 size

<span class="extimage32px">{{Item icon|Glowy Yellow Crystal}}</span>

icon_5702.png


Forcing 64x64 size

<span class="extimage64px">{{Item icon|Ice Core}}</span>

icon_5295.png