Template:VColor: Difference between revisions
From Melvor Idle
(Add Base parameter) |
m (noinclude -> onlyinclude) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 55: | Line 54: | ||
|} | |} | ||
<!-- | |||
Template begins -- | Template begins -->{| class="wikitable" | ||
|- | |- | ||
< | <onlyinclude><includeonly><td style="{{#ifeq:{{{1|0}}}|{{{Base|{{CurrentVersion}}}}}|background-color:{{{ColorCurrent|#E8FFEB}}}|background-color:{{{ColorOld|#FFE8E8}}}}};">{{{Text|{{{1}}}}}}</td></includeonly></onlyinclude> | ||
|} | |} |
Latest revision as of 09:30, 31 January 2022
Applies the appropriate background color to a table cell based on whether the given version number is up-to-date in relation to the current game version
Parameter | Description | Type | Status | |
---|---|---|---|---|
Version Number | 1 | Version number to be compared to current game version | Number | required |
Color: Current | ColorCurrent | Background color to be displayed when the given version number is current/up to date
| String | optional |
Color: Outdated | ColorOld | Background color to be displayed when the given version number is outdated
| String | optional |
Alternative Text | Text | Text to be displayed instead of the version number | String | optional |
Base Version | Base | Version to compare "Version Number" against if not the current version | Number | optional |
Examples
Template | Result |
---|---|
{{VColor|1.3.1}}
| 1.3.1 |
{{VColor|0.18}}
| 0.18 |
{{VColor|0.17|ColorOld=#FF0000|Text=Out of date}}
| Out of date |
{{VColor|0.40|Base=1.00|Text=Always out of date}}
| Always out of date |