Template:Button: Difference between revisions
From Space Station 14 Wiki
(style) |
(added a theme option) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
-->{{#vardefine: button_bg_clip_pixels|5}}<!-- | -->{{#vardefine: button_bg_clip_pixels|5}}<!-- | ||
-->{{#vardefine: button_theme_bg_color | |||
|{{#switch: {{lc: {{{2|normal}}}}} | |||
|normal = #464966 | |||
|active = #3e6c45 | |||
}}}}<!-- | |||
--><kbd style=" | --><kbd style=" | ||
background-color: # | background-color: {{#var: button_theme_bg_color}}; | ||
padding: .2em; | padding: .2em; | ||
white-space: pre; | white-space: pre; | ||
Line 137: | Line 143: | ||
"required": true, | "required": true, | ||
"description": "Select from the list, or use your own." | "description": "Select from the list, or use your own." | ||
}, | |||
"2": { | |||
"label": "Theme", | |||
"description": "Theme of the button. Any casing is allowed, including lowercase.", | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"Normal", | |||
"Active" | |||
], | |||
"default": "Normal", | |||
"suggested": true | |||
} | } | ||
}, | }, | ||
"description": "For representing a keyboard or other buttons." | "description": "For representing a keyboard or other buttons.", | ||
"paramOrder": [ | |||
"1", | |||
"2" | |||
] | |||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 21:32, 14 August 2024
Examples
{{button
↓
Server List
Theming
Not implemented yet.
Button state
Normal
The default.
Pressed
{{button
↓
EnabledFor representing a keyboard or other buttons.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Key | 1 | Select from the list, or use your own.
| Line | required |
Theme | 2 | Theme of the button. Any casing is allowed, including lowercase.
| Line | suggested |