Difference between revisions of "Template:Icon/doc"

From RimWorld Wiki
Jump to navigation Jump to search
m (→‎Examples: Tweaked header.)
(Added gold.)
Line 2: Line 2:
 
== Usage ==
 
== Usage ==
 
<pre>{{icon  
 
<pre>{{icon  
| type (metal/plasteelcloth//devilstrand/synthread/hyperweave/stone/silver/potato/agave/berries/bmeat/smeat/hmeat/herbal/medicine/glitterworld...) - used for icon  
+
| type (metal/plasteel/cloth/devilstrand/synthread/hyperweave/stone/silver/gold/potato/agave/berries/bmeat/smeat/hmeat/herbal/medicine/glitterworld...) - used for icon  
 
| amount  
 
| amount  
 
| image size (optional, 16px resize by default)
 
| image size (optional, 16px resize by default)
Line 10: Line 10:
 
=== Examples ===
 
=== Examples ===
 
Just an icon: {{icon|metal}}
 
Just an icon: {{icon|metal}}
<pre>{{icon|metal|30}}</pre>
+
<pre>{{icon|metal}}</pre>
  
 
Icon with quantity: {{icon|potato|10}}
 
Icon with quantity: {{icon|potato|10}}
Line 16: Line 16:
  
 
Bigger icon with quantity: {{icon|silver|250|32}}
 
Bigger icon with quantity: {{icon|silver|250|32}}
<pre>{{icon|silver|250|64}} (size is in pixels)</pre>
+
<pre>{{icon|silver|250|32}} (size is in pixels)</pre>
  
{{icon|metal|}}{{icon|plasteel}}{{icon|cloth}}{{icon|devilstrand}}{{icon|synthread}}{{icon|hyperweave}}{{icon|stone|}}{{icon|silver|}}{{icon|potato|}}{{icon|agave|}}{{icon|berries|}}{{icon|bmeat|}}{{icon|smeat|}}{{icon|hmeat|}}{{icon|npaste|}}{{icon|simple|}}{{icon|fine|}}{{icon|lavish|}}{{icon|herbal}}{{icon|medicine}}{{icon|glitterworld}}
+
{{icon|metal}}{{icon|plasteel}}{{icon|cloth}}{{icon|devilstrand}}{{icon|synthread}}{{icon|hyperweave}}{{icon|stone}}{{icon|silver}}{{icon|gold}}{{icon|potato}}{{icon|agave}}{{icon|berries}}{{icon|bmeat}}{{icon|smeat}}{{icon|hmeat}}{{icon|npaste}}{{icon|simple}}{{icon|fine}}{{icon|lavish}}{{icon|herbal}}{{icon|medicine}}{{icon|glitterworld}}
  
 
== Without a parameter ==
 
== Without a parameter ==

Revision as of 10:02, 15 April 2016

A minimalist helper template to quickly create a resource icon.

Usage

{{icon 
| type (metal/plasteel/cloth/devilstrand/synthread/hyperweave/stone/silver/gold/potato/agave/berries/bmeat/smeat/hmeat/herbal/medicine/glitterworld...) - used for icon 
| amount 
| image size (optional, 16px resize by default)
| image position (optional, use default settings)
}}

Examples

Just an icon: Steel

{{icon|metal}}

Icon with quantity: Potato 10

{{icon|potato|10}}

Bigger icon with quantity: Silver 250

{{icon|silver|250|32}} (size is in pixels)

Steel Plasteel Cloth Devilstrand Cloth Synthread Hyperweave Stone Silver Gold Potato Agave Berries Meat big Meat small Meat human Nutrient paste meal Simple meal Fine meal Lavish meal Herbal medicine Medicine Glitterworld medicine

Without a parameter

Using the template without any parameters will simply generate a icon, without anything other text.

Render and link

  • Template will not generate a link, and will not be linkable (neither the text, nor the icon).
  • However, mousing over the template will create a hover text with the full English rendering, for readability:
Steel | class="text-right" | Metal
Steel 1 | class="text-right" | 1 Metal
Steel 5 | class="text-right" |5 Metal