Template:KeyLarge: Difference between revisions
m (docs wording) |
m (typo) |
||
Line 26: | Line 26: | ||
*'''top_char''', '''bot_char''': The top and bottom characters which should appear on the button. | *'''top_char''', '''bot_char''': The top and bottom characters which should appear on the button. | ||
*'''scale''': A percentage, default value of 100. At 100, the button will be 95x95 px. | *'''scale''': A percentage, default value of 100. At 100, the button will be 95x95 px. | ||
*'''top_scale''', '''bot_scale''': The font size of the top and bottom characters, as a scaling factor for the default font size of 150%. The font size will automatically scale with the use of '''scale''', but you will find that certain characters need to have their scaling fine-tuned to look good on the button. These parameters will add a further multiplier to the '''scale''' multiplier, e.g. setting '''bot_scale''' to 133 on a 50%-scale button will raise the font size from 75% (150 * 0.5) to | *'''top_scale''', '''bot_scale''': The font size of the top and bottom characters, as a scaling factor for the default font size of 150%. The font size will automatically scale with the use of '''scale''', but you will find that certain characters need to have their scaling fine-tuned to look good on the button. These parameters will add a further multiplier to the '''scale''' multiplier, e.g. setting '''bot_scale''' to 133 on a 50%-scale button will raise the font size from 75% (150 * 0.5) to 100% (150 * 0.5 * 1.33). | ||
==Sample usage== | ==Sample usage== |
Revision as of 23:59, 26 April 2025
Call this template when you want to draw an image of a keyboard button.
Parameters
- top_char, bot_char: The top and bottom characters which should appear on the button.
- scale: A percentage, default value of 100. At 100, the button will be 95x95 px.
- top_scale, bot_scale: The font size of the top and bottom characters, as a scaling factor for the default font size of 150%. The font size will automatically scale with the use of scale, but you will find that certain characters need to have their scaling fine-tuned to look good on the button. These parameters will add a further multiplier to the scale multiplier, e.g. setting bot_scale to 133 on a 50%-scale button will raise the font size from 75% (150 * 0.5) to 100% (150 * 0.5 * 1.33).
Sample usage
{{KeyboardButton|top_char=§|bot_char=½}}
yields:
Template:KeyboardButton
{{KeyboardButton|top_char=~|top_scale=117|bot_char=`|bot_scale=133}}
yields:
Template:KeyboardButton
vs. how it would look without the special scaling for each character:
Template:KeyboardButton
The same button at 50% scale:
{{KeyboardButton|scale=50|top_char=~|top_scale=117|bot_char=`|bot_scale=133}}
yields:
Template:KeyboardButton