Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Sprite: Difference between revisions

Template page
NekoPillow (talk | contribs)
mNo edit summary
NekoPillow (talk | contribs)
m Undo revision 90106 by Mctommycheng (talk)
Line 1: Line 1:
<includeonly><span class="growsprite mobile-hide" style="{{
<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 03:34, 10 September 2017

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:

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
Contents