Template:PrizeBubble: Difference between revisions

From Imagisphere
Jump to navigation Jump to search
mNo edit summary
(Fixed image display to be centered inside bubble)
Line 1: Line 1:
<includeonly><div class="prizebubble"><span class="prizebubble-mask">
<includeonly><div class="prizebubble"><span class="prizebubble-mask">
{|  
{|<!--
|style="vertical-align:center; text-align:center; height:{{{bubble-size|256px}}}; width:{{{bubble-size|256px}}}; |[[File:{{{image|Warning_Missing_Icon.png}}}|{{{item-size|128px}}}|class=prizebubble-mask:after|{{{text}}}]]
-->{{#ifexpr: {{{item-size|92}}} > {{{bubble-size|128}}}
| style="margin-left:{{#expr: <!--
-->{{#expr: <!--
-->{{#expr: {{{bubble-size|128}}} - {{{item-size|92}}} }}<!--
--> / 2}} - <!--
-->{{#expr: {{#expr: {{#expr: {{{bubble-size|128}}} + {{{item-size|92}}} }}<!--
-->/ {{{bubble-size|128}}} }} + 6}}<!--
--> }}px;<!--
-->margin-top:{{#expr: <!--
-->{{#expr: <!--
-->{{#expr: {{{bubble-size|128}}} - {{{item-size|92}}} }}<!--
--> / 2}} - <!--
-->{{#expr: {{#expr: {{#expr: {{{bubble-size|128}}} + {{{item-size|92}}} }}<!--
-->/ {{{bubble-size|128}}} }} + 6}}<!--
--> }}px;"<!--
-->| style="margin-left:{{#expr:<!--
-->{{#expr: {{#expr: {{{bubble-size|128}}} + {{{item-size|92}}} }} / -{{{bubble-size|128}}} }} - 2}} }}px;<!--
-->margin-top:{{#expr:<!--
-->{{#expr: {{#expr: {{{bubble-size|128}}} + {{{item-size|92}}} }} / -{{{bubble-size|128}}} }} - 2}} }}px;"}}
|style="vertical-align:center; text-align:center; height:{{{bubble-size|128}}}px; width:{{{bubble-size|128}}}px; |[[File:{{{image|Warning_Missing_Icon.png}}}|{{{item-size|92}}}px|class=prizebubble-mask:after|{{{text}}}]]
|}
|}
</span>[[File:Bubble.png|{{{bubble-size|256px}}}|class=prizebubble-overlay]]</div></includeonly><noinclude>
</span>[[File:Bubble.png|{{{bubble-size|128}}}px|class=prizebubble-overlay]]</div></includeonly><noinclude>
{{todo|Fix image display so that the item in the bubble can be cropped on all sides instead of being stuck to the upper left. If you can add a fix, please do it!}}


{{PrizeBubble|image=Sticker_England_Seaside_Chest_Body.png|bubble-size=128px|item-size=92px}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Body.png|bubble-size=128|item-size=40}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Lid.png|bubble-size=128px|item-size=92px}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Body.png|bubble-size=128|item-size=300}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Inside.png|bubble-size=128px|item-size=92px}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Body.png|bubble-size=128|item-size=92}}
{{PrizeBubble|image=Sticker_England_Garden_Banner_Large.png|bubble-size=128px|item-size=46px}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Lid.png|bubble-size=128|item-size=92}}
{{PrizeBubble|image=Sticker_England_Garden_Banner_Thin.png|bubble-size=128px|item-size=23px}}
{{PrizeBubble|image=Sticker_England_Seaside_Chest_Inside.png|bubble-size=128|item-size=92}}
{{PrizeBubble|image=Sticker_England_Garden_Banner_Large.png|bubble-size=128|item-size=46}}
{{PrizeBubble|image=Sticker_England_Garden_Banner_Thin.png|bubble-size=128|item-size=23}}


Creates a prize bubble based on the image you specify, with adjustable item size.
Creates a prize bubble based on the image you specify, with adjustable item size. Do NOT include px after the size number.
==Usage==
==Usage==
<code><nowiki>{{PrizeBubble|image=Item.png|bubble-size=256|item-size=32px}}</nowiki></code>
<code><nowiki>{{PrizeBubble|image=Item.png|bubble-size=128|item-size=92}}</nowiki></code>
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 19:39, 2 August 2023


{{{text}}}
Bubble.png
{{{text}}}
Bubble.png
{{{text}}}
Bubble.png
{{{text}}}
Bubble.png
{{{text}}}
Bubble.png
{{{text}}}
Bubble.png
{{{text}}}
Bubble.png

Creates a prize bubble based on the image you specify, with adjustable item size. Do NOT include px after the size number.

Usage

{{PrizeBubble|image=Item.png|bubble-size=128|item-size=92}}