Template:Button: Difference between revisions
From A KoL Wiki
imported>Fig bucket m add a pre option |
imported>Fig bucket m centertext |
||
Line 2: | Line 2: | ||
|- | |- | ||
| {{{pre|}}} | | {{{pre|}}} | ||
| style="border: 2px black solid; font-family: Arial, Helvetica, sans-serif; {{#ifeq:{{{disabled|n}}}|y|color:#CCCCCC;|}} font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px;{{#if:{{{width|}}}|width:{{{width}}};}}" | {{{1}}} | | style="border: 2px black solid; font-family: Arial, Helvetica, sans-serif; {{#ifeq:{{{disabled|n}}}|y|color:#CCCCCC;|}} font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px;{{#if:{{{width|}}}|width:{{{width}}};}}{{#ifeq:{{{centertext|n}}}|y|text-align:center;|}}" | {{{1}}} | ||
| {{{post|}}} | | {{{post|}}} | ||
|}</includeonly><noinclude> | |}</includeonly><noinclude> | ||
Line 15: | Line 15: | ||
*To create an un-centered button (with no left/right margins), use | *To create an un-centered button (with no left/right margins), use | ||
*:<nowiki>{{button|Text|center=n}}</nowiki> | *:<nowiki>{{button|Text|center=n}}</nowiki> | ||
*To create an button with each line of multi-line text centered, use | |||
*:<nowiki>{{button|Text|centertext=y}}</nowiki> | |||
*To create a grayed out button: | *To create a grayed out button: | ||
*:<nowiki>{{button|Text|disabled=y}}</nowiki> | *:<nowiki>{{button|Text|disabled=y}}</nowiki> | ||
Line 34: | Line 36: | ||
*<code><nowiki>{{button|[[Loathing Legion hammer]]|center=n}}</nowiki></code> yields | *<code><nowiki>{{button|[[Loathing Legion hammer]]|center=n}}</nowiki></code> yields | ||
{{button|[[Loathing Legion hammer]]|center=n}} | {{button|[[Loathing Legion hammer]]|center=n}} | ||
*<code><nowiki>{{button|Travel back to a Delicious Meal<br>(3 minutes)|textcenter=y}}</nowiki></code> yields | |||
{{button|Travel back to a Delicious Meal<br>(3 minutes)|textcenter=y}} | |||
*<code><nowiki>{{button|Sneak past it|disabled=y}}</nowiki></code> yields: | *<code><nowiki>{{button|Sneak past it|disabled=y}}</nowiki></code> yields: | ||
{{button|Sneak past it|disabled=y}} | {{button|Sneak past it|disabled=y}} |
Revision as of 21:48, 31 August 2016
[edit]
{{Button}}
{| cellspacing="0" style="{{#ifeq:{{{center|y}}}|y|margin-left: auto; margin-right: auto; margin-bottom: 8px;|}}" id="{{{1}}}"
|- | {{{pre|}}} | style="border: 2px black solid; font-family: Arial, Helvetica, sans-serif; {{#ifeq:{{{disabled|n}}}|y|color:#CCCCCC;|}} font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px;{{#if:{{{width|}}}|width:{{{width}}};}}{{#ifeq:{{{centertext|n}}}|y|text-align:center;|}}" | {{{1}}} | {{{post|}}}
|}Creates a button in the style typically seen in the game.
Usage
- To create a centered button:
- {{button|Text}}
- To create an un-centered button (with no left/right margins), use
- {{button|Text|center=n}}
- To create an button with each line of multi-line text centered, use
- {{button|Text|centertext=y}}
- To create a grayed out button:
- {{button|Text|disabled=y}}
- To create a button with text following:
- {{button|Text|post=(Following Text)}}
- To create a button with text preceding:
- {{button|Text|pre=(Preceding Text)}}
- Width may be specified with the
width
argument.
In either version, "Text" can be anything, including wiki links to other pages.
Examples
{{button|Log In}}
yields:
Log In |
{{button|Buy Item}}
yields:
Buy Item |
{{button|Sail Away! (3)}}
yields:
Sail Away! (3) |
{{button|[[Loathing Legion hammer]]|center=n}}
yields
Loathing Legion hammer |
{{button|Travel back to a Delicious Meal<br>(3 minutes)|textcenter=y}}
yields
Travel back to a Delicious Meal (3 minutes) |
{{button|Sneak past it|disabled=y}}
yields:
Sneak past it |
{{button|Go to the First Floor|disabled=y|post=Wait, maybe not}}
yields:
Go to the First Floor | Wait, maybe not |