v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Difference between revisions of "Template:Menu icon"
Jump to navigation
Jump to search
(Added "num" parameter to allow fewer icons to be displayed if desired (count from last)) |
(reduced overlap because of small buttons, moved key up to slightly reduce effect on line spacing, added Esc example (mostly to preview changes but might as well keep it)) |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
-->{{#ifexpr:{{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}}-{{#if:{{{2|}}}|1|0}} > 0 |<!-- | -->{{#ifexpr:{{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}}-{{#if:{{{2|}}}|1|0}} > 0 |<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1|<noinclude>b</noinclude>}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1|<noinclude>b</noinclude>}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{1|<noinclude>b</noinclude>}}}}}</span></span><!-- |
-->{{#ifexpr: {{#if:{{{2|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}} > 0 | {{{sep|}}}}}<!--draw sep if icon exists above and below | -->{{#ifexpr: {{#if:{{{2|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}} > 0 | {{{sep|}}}}}<!--draw sep if icon exists above and below | ||
-->}}<!-- | -->}}<!-- | ||
Line 9: | Line 9: | ||
-->{{#ifexpr: {{#if:{{{2|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}} > 0 |<!-- | -->{{#ifexpr: {{#if:{{{2|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}}-{{#if:{{{3|}}}|1|0}} > 0 |<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{2}}}}}</span></span><!-- |
-->{{#ifexpr: {{#if:{{{3|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}} > 0 | {{{sep|}}}}}<!--draw sep if icon exists above and below | -->{{#ifexpr: {{#if:{{{3|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}} > 0 | {{{sep|}}}}}<!--draw sep if icon exists above and below | ||
-->}}<!-- | -->}}<!-- | ||
Line 15: | Line 15: | ||
-->{{#ifexpr: {{#if:{{{3|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}} > 0 |<!-- | -->{{#ifexpr: {{#if:{{{3|}}}|1|0}} and {{{num|4}}}-{{#if:{{{4|}}}|1|0}} > 0 |<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{3}}}}}</span></span><!-- |
-->{{#if:{{{4|}}} | {{{sep|}}}}}<!--draw sep if icon exists above and below | -->{{#if:{{{4|}}} | {{{sep|}}}}}<!--draw sep if icon exists above and below | ||
-->}}<!-- | -->}}<!-- | ||
Line 21: | Line 21: | ||
-->{{#if:{{{4|}}}|<!-- | -->{{#if:{{{4|}}}|<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}{{{4}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}{{{4}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{4}}}}}</span></span>}}<!-- |
-->|<!--simpler case for "num" undefined where user wants to display all icons | -->|<!--simpler case for "num" undefined where user wants to display all icons | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1|<noinclude>b</noinclude>}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1|<noinclude>b</noinclude>}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{1|<noinclude>b</noinclude>}}}}}</span></span><!-- |
-->{{#if:{{{2|}}}|<!-- | -->{{#if:{{{2|}}}|<!-- | ||
-->{{{sep|}}}<!-- | -->{{{sep|}}}<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{2}}}}}</span></span>}}<!-- |
-->{{#if:{{{3|}}}|<!-- | -->{{#if:{{{3|}}}|<!-- | ||
-->{{{sep|}}}<!-- | -->{{{sep|}}}<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{3}}}}}</span></span>}}<!-- |
-->{{#if:{{{4|}}}|<!-- | -->{{#if:{{{4|}}}|<!-- | ||
-->{{{sep|}}}<!-- | -->{{{sep|}}}<!-- | ||
--><span style="display: inline-flex;"><!-- | --><span style="display: inline-flex;"><!-- | ||
− | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}{{{4}}}.png]]<span style="align-self: flex-end; margin-left: - | + | -->[[File:Ui {{{1}}}{{{2}}}{{{3}}}{{{4}}}.png]]<span style="align-self: flex-end; margin-left: -3px; margin-bottom: 0px;">{{k|{{{4}}}}}</span></span>}}<!-- |
-->}}<!-- | -->}}<!-- | ||
--></span><noinclude> | --></span><noinclude> | ||
---- | ---- | ||
− | |||
− | |||
===Examples of Appearance=== | ===Examples of Appearance=== | ||
Line 75: | Line 73: | ||
|- | |- | ||
|``<nowiki>{{Menu icon|b|o|l|y|sep=&rarr;|num=2}}</nowiki>`` || {{Menu icon|b|o|l|y|sep=→|num=2}} | |``<nowiki>{{Menu icon|b|o|l|y|sep=&rarr;|num=2}}</nowiki>`` || {{Menu icon|b|o|l|y|sep=→|num=2}} | ||
+ | |- | ||
+ | |``<nowiki>{{Menu icon|Esc}}</nowiki>`` || {{Menu icon|Esc}} | ||
|} | |} | ||
---- | ---- | ||
See also: {{t|key}} | See also: {{t|key}} | ||
[[Category:Inline formatting templates]] | [[Category:Inline formatting templates]] | ||
+ | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 02:24, 24 June 2023
Examples of Appearance
Selected from the b build menu.
Usage
{{Menu icon|b}}
Multiple keys can be passed as separate parameters to this template, with the "sep" parameter determining the separator (the default is an empty string), and the number of icons to display, counting from the end, as the "num" parameter (the default displays 4 icons).
{{Menu icon|key|sep=separator>|num=number}}
See also: {{key}}