Difference between revisions of "Template:TooltipImage"

From Stoneshard wiki
Jump to navigation Jump to search
(add tooltip parameter to Skill template so that it doesn't show image in tooltips)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{thumb|}}}|{{#switch:{{{thumb}}}
<includeonly>
|left|right=<div class{{=}}"thumb t{{{thumb}}}">
[[{{{link|{{{1}}}}}}|<div style="position:absolute;left:{{{left|{{{2}}}}}}px;top:{{{top|{{{3}}}}}}px;width:{{{width|{{{size|{{{4}}}}}}}}}px;height:{{{height|{{{size|{{{5|{{{4}}}}}}}}}}}}px;{{#if:{{{border|}}}|border:{{{border}}}}}">{{#tip-img: {{#ifexist: File:{{{1}}}.png|{{filepath:{{{1}}}.png}}|{{filepath:{{{1}}}.PNG}}}}|{{Tooltip hover box |title= {{Skill|{{{1}}}|tooltip=1}}}}}}</div>]]</includeonly><noinclude>{{doc|ImageMap}}
|center=<div class{{=}}"center"><div class{{=}}"thumb tnone">
|<div class{{=}}"thumb tnone">
}}<div class="thumbinner" style="display:inline-block;position:relative"><div style="width:{{{1}}};height:{{{2}}};margin:auto;position:relative;">|<div style="display:inline-block;position:relative">}}{{{areas|{{{3|}}}}}}{{#if:{{{thumb|}}}|</div>}}{{#if:{{{thumb|}}}|<div class="thumbcaption"><div class="magnify">[[:File:|<div class="Internal"></div>]]</div>{{{caption|}}}</div></div></div>{{#ifeq:{{{thumb}}}|center|</div>}}}}</div></includeonly><noinclude>{{doc}}
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 15:35, 12 April 2023

Template-info.png Documentation

This template partially replicates the function of the Imagemap plugin. This template is primarily used together with {{ImageMap}}. It creates the clickable image/links in specified areas of the image, that also display tooltips on hover.

{{MapArea|skill_name|left|top|width|height(=width if not specified)|border(optional)}}

Example usage from Swords (skill tree)

{{ImageMap|338px|Swords_skilltree.png|
{{TooltipImage|Cleaving Strike|35|84|62}}
{{TooltipImage|Blade Maintenance|135|84|62}}
{{TooltipImage|Keeping Distance|235|84|62}}
{{TooltipImage|Gloat|35|230|62}}
{{TooltipImage|Fencer's Stance|135|230|62}}
{{TooltipImage|Endurance Training|235|230|62}}
{{TooltipImage|Honed Edge|85|376|62}}
{{TooltipImage|Onrush|187|376|62}}

|thumb=right
|caption=Hover over the skill icons to view the detailed descriptions.
}}