Template:Signal: Difference between revisions
Appearance
Initial draft of an item display template |
Add inline display support |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><span class="shapez-signal">{{#switch: {{{1}}} | <includeonly><span class="shapez-signal {{#ifeq: {{{2}}}|inline|inline|}}" title="{{{1}}}">{{#switch: {{{1}}} | ||
| true = [[File:Boolean true.png|32px]] | | true = [[File:Boolean true.png|32px]] | ||
| false = [[File:Boolean false.png|32px]] | | false = [[File:Boolean false.png|32px]] | ||
| Line 10: | Line 10: | ||
| white = [[File:Color White.png|32px]] | | white = [[File:Color White.png|32px]] | ||
| uncolored = [[File:Color Uncolored.png|32px]] | | uncolored = [[File:Color Uncolored.png|32px]] | ||
| null = [[File:Wires_null.png|32px]] | |||
| conflict = [[File:Wires_conflict.png|32px]] | |||
| #default = <strong class="error">Invalid signal: {{{1}}}</strong> | | #default = <strong class="error">Invalid signal: {{{1}}}</strong> | ||
}}</span></includeonly><noinclude> | }}</span></includeonly><noinclude> | ||
| Line 36: | Line 38: | ||
|- | |- | ||
| <nowiki>{{Signal|uncolored}}</nowiki> || {{Signal|uncolored}} | | <nowiki>{{Signal|uncolored}}</nowiki> || {{Signal|uncolored}} | ||
|- | |||
| <nowiki>{{Signal|null}}</nowiki> || {{Signal|null}} | |||
|- | |||
| <nowiki>{{Signal|conflict}}</nowiki> || {{Signal|conflict}} | |||
|} | |} | ||
| Line 43: | Line 49: | ||
"1": { | "1": { | ||
"label": "Signal", | "label": "Signal", | ||
"description": "The | "description": "The value to display (shapes are not supported yet).", | ||
"example": "true", | "example": "true", | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ | "suggestedvalues": [ | ||
"true", | "true", | ||
"false" | "false", | ||
"red", | |||
"green", | |||
"blue", | |||
"cyan", | |||
"purple", | |||
"yellow", | |||
"white", | |||
"uncolored", | |||
"null", | |||
"conflict" | |||
], | ], | ||
"required": true | "required": true | ||
}, | |||
"2": { | |||
"label": "Inline", | |||
"description": "Adjust signal appearance for better alignment with text.", | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"inline" | |||
] | |||
} | } | ||
}, | }, | ||
"description": "Displays a | "description": "Displays a wire network value as it appears in shapez. This template supports regular (default) and inline styles, with the latter resulting in smaller image size and better alignment with page text.", | ||
"format": "inline" | |||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 01:53, 3 February 2026
| Wikitext | Transclusion result |
|---|---|
| {{Signal|true}} | |
| {{Signal|false}} | |
| {{Signal|red}} | |
| {{Signal|green}} | |
| {{Signal|blue}} | |
| {{Signal|cyan}} | |
| {{Signal|purple}} | |
| {{Signal|yellow}} | |
| {{Signal|white}} | |
| {{Signal|uncolored}} | |
| {{Signal|null}} | |
| {{Signal|conflict}} |
Displays a wire network value as it appears in shapez. This template supports regular (default) and inline styles, with the latter resulting in smaller image size and better alignment with page text.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Signal | 1 | The value to display (shapes are not supported yet).
| String | required |
| Inline | 2 | Adjust signal appearance for better alignment with text.
| Line | optional |