Difference between revisions of "Template:Icon"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
m
m
 
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{#switch: {{{Icon|}}}
+
{{#switch:{{{1|}}}
| gold = Gold Icon.png
+
<!--Currency-->
| gem = Gem Icon.png
+
| currency = {{#switch:{{{2|}}}
| medal = Defender Medal Icon.png
+
  |gold = [[File:Gold Icon.png|18px]]
| worn = Worn Icon.png
+
  |medal = [[File:Defender Medal Icon.png|18px]]
| sturdy = Sturdy Icon.png
+
  |gem = [[File:Gem Icon.png|18px]]
| powerful = Powerful Icon.png
+
}}
| epic = Epic Icon.png
+
<!--rarity-->
| mythical = Mythical Icon.png
+
| rarity = {{#switch:{{{2|}}}
| legendary = Legendary Icon.png
+
  |worn = <span style="color:#808080"> [[File:Worn Icon.png|18px]] Worn </span>
| godly = Godly Icon.png
+
  |sturdy = <span style="color:#808000"> [[File:Sturdy Icon.png|18px]] Sturdy </span>
| ancient = Ancient Icon.png
+
  |powerful = <span style="color:#008000"> [[File:Powerful Icon.png|18px]] Powerful </span>
| #default = Error
+
  |epic = <span style="color:#3366FF"> [[File:Epic Icon.png|18px]] Epic </span>
}}| {{{size|18px}}}]]</includeonly>
+
  |mythical = <span style="color:#ff00ff"> [[File:Mythical Icon.png|18px]] Mythical </span>
 +
  |legendary = <span style="color:#FFF380"> [[File:Legendary Icon.png|18px]] Legendary </span>
 +
  |godly = <span style="color:#40E0D0"> [[File:Godly Icon.png|18px]] Godly </span>
 +
  |ancient = <span style="color:#DD1F13"> [[File:Ancient Icon.png|18px]] Ancient </span>
 +
}}
 +
<!--checkbox-->
 +
| checkbox = {{#switch:{{{2|}}}
 +
  |yes = [[File:TickGreen.png]]
 +
  |no = [[File:CrossWhite.png]]
 +
}}
 +
}}<!--
 +
 
 +
--><noinclude>
 +
{| style="text-align: center; width:75%;"
 +
|-
 +
|
 +
'''Usage:''' <br> <code><nowiki>{{</nowiki>Icon|''category''|''type''<nowiki>}}</nowiki></code>
 +
||
 +
'''Example:''' <br> <code><nowiki>{{</nowiki>Icon|rarity|powerful<nowiki>}}</nowiki></code>
 +
|}
 +
 
 +
* Current default size will always be '''18px'''.
 +
* Accepted inputs are not case-sensitive. But for consistency, probably best to stick to having the first letter of each input in upper-case.
 +
* Only the rarity category will automatically have the wording beside their respective icons.
 +
 
 +
=== Available Inputs ===
 +
{| class="wikitable" style="width:75%;"
 +
|-
 +
! Currency !! Rarity !! Checkbox
 +
|-
 +
|style="vertical-align: top; width:25%;"|
 +
{{Icon|currency|gold}} Gold
 +
 
 +
{{Icon|currency|medal}} Defender Medal
 +
 
 +
{{Icon|currency|gem}} Gem
 +
|style="vertical-align: top;width:25%;"|
 +
{{Icon|rarity|worn}}
 +
 
 +
{{Icon|rarity|sturdy}}
 +
 
 +
{{Icon|rarity|powerful}}
 +
 
 +
{{Icon|rarity|epic}}
 +
 
 +
{{Icon|rarity|mythical}}
 +
 
 +
{{Icon|rarity|legendary}}
 +
 
 +
{{Icon|rarity|godly}}
 +
 
 +
{{Icon|rarity|ancient}}
 +
|style="vertical-align: top; width:25%;"|
 +
{{Icon|checkbox|yes}} Yes
 +
 
 +
{{Icon|checkbox|no}} No
 +
|}
 +
__NOEDITSECTION__
 +
</noinclude>

Latest revision as of 14:04, 22 June 2026

Usage:
{{Icon|category|type}}

Example:
{{Icon|rarity|powerful}}

  • Current default size will always be 18px.
  • Accepted inputs are not case-sensitive. But for consistency, probably best to stick to having the first letter of each input in upper-case.
  • Only the rarity category will automatically have the wording beside their respective icons.

Available Inputs

Currency Rarity Checkbox

Gold Icon.png Gold

Defender Medal Icon.png Defender Medal

Gem Icon.png Gem

Worn Icon.png Worn

Sturdy Icon.png Sturdy

Powerful Icon.png Powerful

Epic Icon.png Epic

Mythical Icon.png Mythical

Legendary Icon.png Legendary

Godly Icon.png Godly

Ancient Icon.png Ancient

TickGreen.png Yes

CrossWhite.png No