Template:Sprite/doc: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "Sprite is a template which draws a single sprite from a spritesheet. If a sprite is drawn for a one-off thing, you can use this template directly. Otherwise, it's better to create a separate template for the character, to reduce boilerplate. == Arguments == {| class="wikitable" |+ Caption text |- ! Argument !! Required? !! Description |- | ratio || No || A scale factor to apply to the sprite. 1 = leave as is. |- | sheetWidth || Yes || The width of the source sprites...")
 
No edit summary
Line 6: Line 6:


{| class="wikitable"
{| class="wikitable"
|+ Caption text
|+ Arguments for Template:Sprite
|-
|-
! Argument !! Required? !! Description
! Argument !! Required? !! Description
Line 28: Line 28:
| col || Yes || The index of the col to display. This is also 1-indexed.
| col || Yes || The index of the col to display. This is also 1-indexed.
|-
|-
| image || Yes || The image to use as the spritesheet. Use full MediaWiki notation, e.g. <code><nowiki>[[File:IanSpriteS|alt=alt text]]</nowiki></code>
| image || Yes || The image to use as the spritesheet. Use full MediaWiki notation, e.g. <code><nowiki>[[File:IanSpriteS.png|alt=alt text]]</nowiki></code>
|}
|}
== Examples ==
{{Sprite
|ratio=1.5
|sheetWidth=160
|sheetHeight=333
|noOfRows=5
|noOfColumns=9
|offsetY=2
|row=2
|col=3
|image=[[File:IanSpriteS.png|alt=alt text]]
}}

Navigation menu