Template:Sprite: Difference between revisions
From Growtopia
Jump to navigationJump to search
>SpaceManiac m Fixed stuff hopefully |
>SpaceManiac m Changed 'sprite' to 'growsprite' |
||
| Line 1: | Line 1: | ||
<includeonly><span class=" | <includeonly><span class="growsprite" style="{{ | ||
#ifeq: {{{size|32}}} | 32 || height: {{{size}}}px; width: {{{size}}}px; }} {{ | #ifeq: {{{size|32}}} | 32 || height: {{{size}}}px; width: {{{size}}}px; }} {{ | ||
#if: {{{align|}}} | vertical-align: {{{align}}} }}"><span style="{{ | #if: {{{align|}}} | vertical-align: {{{align}}} }}"><span style="{{ | ||
Revision as of 01:16, 7 March 2013
Displays a sprite out of a spritesheet image. Used when a lot of small images are needed. Based on the Minecraft Wiki.
Examples
{{Sprite
|pos=1
|align=text-top
|image=ItemSprites.png
|link=Dirt
|size=32
|sheetsize=512
}}
gives: File:ItemSprites.png
| Parameter | Function | Default value |
|---|---|---|
pos |
Position index of the sprite, depends on size and sheetsize (left to right, starting at top-left sprite as 0) |
0 |
align |
Sets the vertical alignment of the image to the text. | middle |
image |
Sprite sheet image, without prefix | ItemSprites.png |
link |
Create a link to this page | None |
size |
Size of each sprite in pixels, width and height | 32 |
sheetsize |
Size of the whole sheet in pixels, width and height, must be multiple of size |
512 |