Szablon:Sprite/opis: Różnice pomiędzy wersjami

Z Minecraft Wiki Polska
Przejdź do nawigacji Przejdź do wyszukiwania
[wersja nieprzejrzana][wersja nieprzejrzana]
Druteczka (dyskusja | edycje)
interwiki
dNie podano opisu zmian
Linia 10: Linia 10:
|link=Grass
|link=Grass
|size=16
|size=16
|sheetsize=256
|sheetsize=384
}}
}}
</pre>
</pre>
Linia 17: Linia 17:
|align=text-top
|align=text-top
|image=BlockCSS_new.png
|image=BlockCSS_new.png
|link=grass
|link=Trawa
|size=16
|size=16
|sheetsize=256
|sheetsize=384
}}
}}


Linia 37: Linia 37:
| <code>size</code> || Size of each sprite in pixels, width and height || 16
| <code>size</code> || Size of each sprite in pixels, width and height || 16
|-
|-
| <code>sheetsize</code> || Size of the whole sheet in pixels, width and height, must be multiple of <code>size</code> || 256
| <code>sheetsize</code> || Size of the whole sheet in pixels, width and height, must be multiple of <code>size</code> || 384
|-
|-
|}
|}
{{doc/end}}
{{doc/end}}
<includeonly>[[en:Template:Sprite]]</includeonly>
<includeonly>[[en:Template:Sprite]]</includeonly>

Wersja z 20:17, 14 sie 2021

Szablon:Doc/start This template creates a sprite from a sheet image. Commonly used when many small images are displayed on one page to reduce the total amount of HTTP connections.

Examples

{{Sprite
|pos=1
|align=text-top
|image=BlockCSS_new.png
|link=Grass
|size=16
|sheetsize=384
}}

give: BlockCSS_new.png/1

Parameter Function Default value
pos Position index of the sprite, depends on size and sheetsize (left to right, starting at top-left sprite) 1
align Sets the vertical alignment of the image to the text. middle
image Sprite sheet image, without prefix BlockCSS_new.png
link Create a link to this page None
size Size of each sprite in pixels, width and height 16
sheetsize Size of the whole sheet in pixels, width and height, must be multiple of size 384

Szablon:Doc/end