Template:GlobalFlag: Difference between revisions

From Ephinea PSO Wiki
m (Template 3.1 (Solitaire not included))
(Added "Global flag" to infobox so its purpose is more clear; Added attributes for "Collection" type; Added example; Examples reorganization)
Line 3: Line 3:
<tr><td><table align="center" style="min-width: 200px; width: 100%">
<tr><td><table align="center" style="min-width: 200px; width: 100%">
<tr>
<tr>
<th colspan="2" class="psoHeader psoStyle" style="width: 100%">{{{title|{{PAGENAME}}}}}</th>
<td colspan="2" align="center" class="psoHeader psoStyle" style="width: 100%; font-size:14px">Global flag<div style="font-size:17px; font-weight:bold">{{{title|{{PAGENAME}}}}}</div></td>
</tr>
</tr>
{{#if:{{{type|}}}|
{{#if:{{{type|}}}|
Line 9: Line 9:
<th style="text-align: left;"><div style="display: inline;" align="left">Type</div><div style="float: right;">:</div></th>
<th style="text-align: left;"><div style="display: inline;" align="left">Type</div><div style="float: right;">:</div></th>
<td style="text-align: right;">{{{type}}}</td>
<td style="text-align: right;">{{{type}}}</td>
</tr>
}}
{{#if:{{{chex|}}}|
<tr>
<th style="text-align: left;"><div style="display: inline;" align="left">Complete {{Note|Clicking/tapping the hexadecimal value will reveal its decimal conversion, if available.|(Hex)}}</div><div style="float: right;">:</div></th>
<td style="text-align: right;"><span class="mw-customtoggle-complete">{{{chex}}}</span></td>
</tr>
}}
{{#if:{{{cdec|}}}|
<tr>
<th style="text-align: left;"><div style="display: inline;" align="left;" class="mw-collapsible mw-collapsed" id="mw-customcollapsible-complete">Complete (Dec)</div><div style="float: right;" class="mw-collapsible mw-collapsed" id="mw-customcollapsible-complete">:</div></th>
<td style="text-align: right;"><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-complete">{{{cdec}}}</div></td>
</tr>
</tr>
}}
}}
Line 40: Line 52:
<td style="text-align: right;"><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-bitmask">{{{bmdec}}}</div></td>
<td style="text-align: right;"><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-bitmask">{{{bmdec}}}</div></td>
</tr>}}</table></table><noinclude>
</tr>}}</table></table><noinclude>
==Usage and Example==
==Usage and Examples==
There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.
There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.
{{GlobalFlag
|title = Lucky Coins
|type = Currency
|max = 100
|fhex = B
|fdec = 11
|bmhex = 00001FC
|bmdec = 508
}}
<pre>
<pre>
{{GlobalFlag
{{GlobalFlag
|title = Lucky Coins
|title = Lucky Coins
|type = Currency
|type = Currency
|max = 100       //optional
|max = 100         // used with Currency type
|fhex = B
|fhex = B
|fdec = 11       //optional, will be hidden until hexadecimal value is clicked/tapped
|fdec = 11         // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 00001FC
|bmhex = 00001FC
|bmdec = 508     //optional, will be hidden until hexadecimal value is clicked/tapped
|bmdec = 508       // optional, will be hidden until hexadecimal value is clicked/tapped
}}
}}
</pre>
</pre>
{{GlobalFlag
{{GlobalFlag
|title = Lucky Coins
|title = Wrapping Papers
|type = Currency
|type = Collection
|max = 100
|chex = 1FF
|cdec = 511
|fhex = B
|fhex = B
|fdec = 11
|fdec = 11
|bmhex = 00001FC
|bmhex = 1FF00000
|bmdec = 508
|bmdec = 535822336
}}
<pre>
{{GlobalFlag
|title = Wrapping Papers
|type = Collection
|chex = 1FF        // used with Collection type
|cdec = 511        // optional, will be hidden until hexadecimal value is clicked/tapped
|fhex = B
|fdec = 11        // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 1FF00000
|bmdec = 535822336 // optional, will be hidden until hexadecimal value is clicked/tapped
}}
}}
</pre>
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 04:20, 24 December 2021

Global flag
GlobalFlag

Usage and Examples

There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.

Global flag
Lucky Coins
Type
:
Currency
Max Amount
:
100
Flag (Hex)
:
B
Flag (Dec)
:
11
Bitmask (Hex)
:
00001FC
Bitmask (Dec)
:
508
{{GlobalFlag
|title = Lucky Coins
|type = Currency
|max = 100         // used with Currency type
|fhex = B
|fdec = 11         // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 00001FC
|bmdec = 508       // optional, will be hidden until hexadecimal value is clicked/tapped
}}
Global flag
Wrapping Papers
Type
:
Collection
Complete (Hex)
:
1FF
Complete (Dec)
:
511
Flag (Hex)
:
B
Flag (Dec)
:
11
Bitmask (Hex)
:
1FF00000
Bitmask (Dec)
:
535822336
{{GlobalFlag
|title = Wrapping Papers
|type = Collection
|chex = 1FF        // used with Collection type
|cdec = 511        // optional, will be hidden until hexadecimal value is clicked/tapped
|fhex = B
|fdec = 11         // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 1FF00000
|bmdec = 535822336 // optional, will be hidden until hexadecimal value is clicked/tapped
}}