Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.

Difference between revisions of "Template:Tickcross-na"

From PCGamingWiki, the wiki about fixing PC games
 
(simplified handling for third parameter and cleanup category variable)
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{lc:{{{1}}}}}
+
<includeonly>{{#switch:{{{1}}}
|yes
+
|limited = {{#if:{{{3|}}}|<div title="Limited native support" class="svg-icon svg-25 tickcross-limited"></div>|<div title="Error: Note required for 'limited' state" class="svg-icon svg-25 tickcross-true-error"></div>}}{{#ifeq: {{NAMESPACE}}{{{3|}}} | | [[Category:Invalid template usage ({{#var:section|Tickcross}})]] }}{{#if: {{{2|}}} | [[{{{2}}}::limited| ]]}}
  |true    = <div title="{{{3|Native support}}}" class="svg-icon svg-25 tickcross-true"></div> {{#if: {{{2|}}} | [[{{{2}}}::true| ]] }}
+
  |true    = <div title="Native support" class="svg-icon svg-25 tickcross-true"></div> {{#if: {{{2|}}} | [[{{{2}}}::true| ]] }}
|no
+
  |false    = <div title="No native support" class="svg-icon svg-25 tickcross-false"></div> {{#if: {{{2|}}} |  [[{{{2}}}::false| ]] }}
  |false    = <div title="{{{3|No native support}}}" class="svg-icon svg-25 tickcross-false"></div> {{#if: {{{2|}}} |  [[{{{2}}}::false| ]] }}
+
  |hackable = {{#if:{{{3|}}}|<div title="Hackable" class="svg-icon svg-25 tickcross-hackable"></div>|<div title="Error: Note required for 'hackable' state" class="svg-icon svg-25 tickcross-hackable-error"></div>}}{{#ifeq: {{NAMESPACE}}{{{3|}}} | | [[Category:Invalid template usage ({{#var:section|Tickcross}})]] }}{{#if: {{{2|}}} | [[{{{2}}}::hackable| ]]}}
  |hackable = <div title="{{{3|Hackable}}}" class="svg-icon svg-25 tickcross-hackable"></div> {{#if: {{{2|}}} | [[{{{2}}}::hackable| ]] }}
+
  |unknown  = <div title="Unknown" class="svg-icon svg-25 tickcross-unknown"></div> {{#if: {{{2|}}} | [[{{{2}}}::unknown| ]] }}{{#vardefine:tickcross unknown|{{#expr:{{#var:tickcross unknown}}+1}}}}
  |unknown  = <div title="{{{3|Unknown}}}" class="svg-icon svg-25 tickcross-unknown"></div> {{#if: {{{2|}}} | [[{{{2}}}::unknown| ]] }}
+
  |n/a      = <div title="Not applicable" class="svg-icon svg-25 tickcross tickcross-not-applicable"></div>
|not applicable
+
  |#default = <div title="Error: '{{{1|}}}' not recognised. Supported values for this setting (case sensitive): limited, true, false, hackable, n/a, unknown" class="svg-icon svg-25 tickcross-error"></div>{{#ifeq: {{NAMESPACE}} | | [[Category:Invalid template usage ({{#var:section|Tickcross}})]] }}{{#vardefine:tickcross unknown|{{#expr:{{#var:tickcross unknown}}+1}}}}
|notapplicable
 
|na
 
  |n/a      = <div title="{{{3|Not applicable}}}" class="svg-icon svg-25 tickcross tickcross-not-applicable"></div>
 
  |#default = [[Category:Invalid template usage]]
 
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 07:32, 13 September 2021

Documentation for the above template (sometimes hidden from view).
Description

This template is used within the settings templates to show an icon stating the presence of certain features or settings. It can optionally take a second argument to automatically set the value of a property.

Arguments
  • 1 - Can only be one of the following: true, false, hackable, unknown, n/a;
  • 2 - Name of the relevant property;
Syntax

{{Tickcross-na|1|2}}