Difference between revisions of "Template:B"

From ALttP Speedrunning Wiki
Jump to: navigation, search
Line 2: Line 2:
 
.snes-button,
 
.snes-button,
 
.snes-button-face,
 
.snes-button-face,
.snes-button-mid {
+
.snes-button-mid,
 +
.snes-button-bumper {
 
display: inline-block;
 
display: inline-block;
 
text-align: center;
 
text-align: center;
Line 41: Line 42:
 
background: #00916A;
 
background: #00916A;
 
border-color:#00331B;
 
border-color:#00331B;
 +
}
 +
 +
.snes-button-bumper {
 +
width:40px;
 +
border-color: #8D8D8D;
 +
background: #B8B8A8;
 +
}
 +
 +
.snes-button-R {
 +
border-radius: 15px 0 0 0;
 +
}
 +
 +
.snes-button-L {
 +
border-radius: 0 15px 0 0;
 
}
 
}
  
Line 55: Line 70:
  
 
}}<span class="{{#switch:{{uc:{{{1}}}}}
 
}}<span class="{{#switch:{{uc:{{{1}}}}}
|A|B|X|Y=snes-button-face snes-button-{{uc:{{{1}}}}}
+
|A|B|X|Y=snes-button-face
|START|SELECT=snes-button-mid snes-button {{ucfirst:{{lc:{{{1}}}}}}}
+
|R|L=snes-button-bumper
}}">{{ucfirst:{{lc:{{{1}}}}}}}</span><noinclude>{{Documentation}}</noinclude>
+
|START|SELECT=snes-button-mid}} snes-button-{{ucfirst:{{lc:{{{1}}}}}}}">{{ucfirst:{{lc:{{{1}}}}}}}</span><noinclude>{{Documentation}}</noinclude>

Revision as of 17:36, 2 June 2018

{{{1}}}
Template documentation[view] [edit] [history] [purge]

Makes SNES buttons pretty.

{{B|A}} A
{{B|B}} B
{{B|X}} X
{{B|Y}} Y
{{B|L}} L
{{B|R}} R
{{B|Start}} Start
{{B|Select}} Select
{{B|Directional}} directional
{{B|D}} d
{{B|^}} ^
{{B|v}} v
{{B|<}} <
{{B|>}} >
{{B|^<}} ^<
{{B|^>}} ^>
{{B|^v}} ^v
{{B|v<}} v<
{{B|v>}} v>
{{B|^<}} ^<
{{B|^v<>}} ^v<>

Chaining

Multiple buttons can be displayed by a single template call, with several delimiters being recognized as special text.

{{B|A|B|<|>}} AB<>
{{B|A|+|B||+|<^}} A+B+<^
{{B|A|,|B|,|<|,|>}} A,B,<,>
{{B|A|;|B|;|<|;|>}} A;B;<;>