ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Difference between revisions of "Template:Values"
From ModEnc
(reworking stringlist - all lists referenced in modenc are comma-separated as are all lists in the games (as far as I can tell)) |
m (Actually, sound/md.ini has commaphobia and uses whitespace instead - adding "separator" argument defaulting to Comma) |
||
Line 19: | Line 19: | ||
|strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | |strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | ||
|stringlist | |stringlist | ||
− | |listofstrings = Comma-separated list of [[Help:Values#Strings|strings]]. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | + | |listofstrings = {{{Separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} |
|color | |color | ||
|colors = [[Help:Values#Colors|Colors]] | |colors = [[Help:Values#Colors|Colors]] | ||
Line 54: | Line 54: | ||
*<code>percentages</code> | *<code>percentages</code> | ||
*<code>special</code> | *<code>special</code> | ||
− | |||
− | |||
In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to. For example: | In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to. For example: | ||
<pre>{{Values|stringlist|[[Animations]]}}</pre> | <pre>{{Values|stringlist|[[Animations]]}}</pre> | ||
yields "{{Values|stringlist|[[Animations]]}}". | yields "{{Values|stringlist|[[Animations]]}}". | ||
+ | |||
+ | In cause of <code>stringlist</code>, an additional argument <code>separator</code> can be provided. It defaults to "Comma" and describes the separator between the list entries. For example: | ||
+ | <pre>{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}</pre> | ||
+ | yields "{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}". | ||
</noinclude> | </noinclude> |
Revision as of 06:18, 21 April 2008
This template generates standardized value type descriptions for a number of common types, to be used in the values=
parameter of Template:Flag.
Usage
{{Values|VALUE TYPE}}
Currently valid value types are:
signed integers
orintegers
unsigned integers
floats
unsigned bytes
orbytes
signed bytes
booleans
strings
stringlist
orlistofstrings
colors
clsids
orlocomotors
leptons
percentages
special
In the case of strings
and stringlist
, a second parameter can be added to note what the strings are limited to. For example:
{{Values|stringlist|[[Animations]]}}
yields "Comma-separated list of strings. (Limited to: Animations)
".
In cause of stringlist
, an additional argument separator
can be provided. It defaults to "Comma" and describes the separator between the list entries. For example:
{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}
yields "Whitespace-separated list of strings. (Limited to: Sound filenames)
".