Difference between revisions of "SpriteImage"
From Sonic Retro
(Created page with "<includeonly>{{cropimage |image={{{1|}}} |width={{#if: {{{crop_width|}}} | {{{crop_width}}} | }} |height={{#if: {{{crop_height|}}} | {{{crop_height}}} | }} |x={{#if: {{{crop_x...") |
BSonirachi (talk | contribs) m (Text replacement - "Category:Sonic Retro templates" to "Category:Templates") |
||
(2 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
|scale={{#if: {{{2|}}} | {{{2}}} | 1 }} | |scale={{#if: {{{2|}}} | {{{2}}} | 1 }} | ||
|sprite=yes | |sprite=yes | ||
+ | |nolink={{{nolink|}}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
'''Note: This is [[sega:Template:Sprite|Template:Sprite]] on Sega Retro.''' | '''Note: This is [[sega:Template:Sprite|Template:Sprite]] on Sega Retro.''' | ||
Line 13: | Line 14: | ||
==Usage== | ==Usage== | ||
− | <tt><nowiki>{{</nowiki> | + | <tt><nowiki>{{</nowiki>SpriteImage|'''{{green|image name.png}}'''|'''{{red|f}}'''}}</tt> |
* <tt>{{red|'''f'''}}</tt> = scaling factor (i.e. 2 is double size). | * <tt>{{red|'''f'''}}</tt> = scaling factor (i.e. 2 is double size). | ||
Line 21: | Line 22: | ||
<pre> | <pre> | ||
− | {{ | + | {{SpriteImage|image name.png|f |
| crop_width= | | crop_width= | ||
| crop_height= | | crop_height= | ||
Line 29: | Line 30: | ||
</pre> | </pre> | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 19:17, 1 January 2022
Note: This is Template:Sprite on Sega Retro.
Display a sprite with optional scaling.
Usage
{{SpriteImage|image name.png|f}}
- f = scaling factor (i.e. 2 is double size).
Cropping sprites
If using a spritesheet, add the following parameters to crop a single sprite:
{{SpriteImage|image name.png|f | crop_width= | crop_height= | crop_x= | crop_y= }}