Template:Location Tooltip: Difference between revisions
From HorizonXI Wiki
(Created page with "<onlyinclude><includeonly>{{#if:{{{area|}}}|{{#ifeq:{{default|{{{tooltip|}}}|{{#section:{{{area}}}/Maps|{{default|{{{map|}}}|Map 1}}}}}}| |{{Colorlink||style=normal|{{#if:{{{map|}}}|{{{area}}}/Maps#{{{map}}}|{{{area}}}/Maps}}|{{default|{{{text|}}}|{{#if:{{{pos|}}}|{{{pos}}}|{{{area}}}{{#if:{{{map|}}}|, {{{map}}}}}}}}}}} |{{Tooltip | id = {{default|{{{id|}}}|{{{area}}}{{{pos|}}}{{{marker pos x|}}}{{{marker pos y|}}}}} | underline = initial | padding = 0 | border = 0 | wid...") Tag: visualeditor-wikitext |
(added option for positions 5 and 6) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#if:{{{area|}}}|{{#ifeq:{{default|{{{tooltip|}}}|{{#section:{{{area}}}/Maps|{{default|{{{map|}}}|Map 1}}}}}}| | <onlyinclude><includeonly>{{#if:{{{area|}}}|{{#ifeq:{{default|{{{tooltip|}}}|{{#section:{{{area}}}/Maps|{{default|{{{map|}}}|Map 1}}}}}}| | ||
| | |[[{{#if:{{{map|}}}|{{{area}}}/Maps#{{{map}}}|{{{area}}}/Maps}}|{{default|{{{text|}}}|{{#if:{{{pos|}}}|{{{pos}}}|{{{area}}}{{#if:{{{map|}}}|, {{{map}}}}}}}}}]] | ||
|{{Tooltip | |{{Tooltip | ||
| id = {{default|{{{id|}}}|{{{area}}}{{{pos|}}}{{{marker pos x|}}}{{{marker pos y|}}}}} | | id = {{default|{{{id|}}}|{{{area}}}{{{pos|}}}{{{marker pos x|}}}{{{marker pos y|}}}}} | ||
Line 20: | Line 20: | ||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos y|}}}|17}} | | offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos y|}}}|17}} | ||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | | style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | ||
}}}}}} | }}}}<!-- | ||
| | |||
pos 2 | |||
-->{{#if:{{{pos 2|}}}|{{Map Overlay | |||
| layer = 0 | |||
| pos = {{{pos 2|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} | |||
| style = width:32px; height:32px; background:{{default|{{{highlight background|}}}|#5555FF}}; opacity:{{default|{{{highlight opacity|}}}|0.5}}; | |||
}}{{#if:{{{marker pos 2 x|}}}{{{marker pos 2 y|}}}|{{Map Overlay | |||
| layer = 1 | |||
| pos = {{{pos 2|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} + {{default|{{{marker pos 2 x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos 2 y|}}}|17}} | |||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | |||
}}}}<!-- | |||
pos 3 | |||
-->{{#if:{{{pos 3|}}}|{{Map Overlay | |||
| layer = 0 | |||
| pos = {{{pos 3|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} | |||
| style = width:32px; height:32px; background:{{default|{{{highlight background|}}}|#5555FF}}; opacity:{{default|{{{highlight opacity|}}}|0.5}}; | |||
}}{{#if:{{{marker pos 3 x|}}}{{{marker pos 3 y|}}}|{{Map Overlay | |||
| layer = 1 | |||
| pos = {{{pos 3|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} + {{default|{{{marker pos 3 x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos 3 y|}}}|17}} | |||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | |||
}}}}<!-- | |||
pos 4 | |||
-->{{#if:{{{pos 4|}}}|{{Map Overlay | |||
| layer = 0 | |||
| pos = {{{pos 4|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} | |||
| style = width:32px; height:32px; background:{{default|{{{highlight background|}}}|#5555FF}}; opacity:{{default|{{{highlight opacity|}}}|0.5}}; | |||
}}{{#if:{{{marker pos 4 x|}}}{{{marker pos 4 y|}}}|{{Map Overlay | |||
| layer = 1 | |||
| pos = {{{pos 4|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} + {{default|{{{marker pos 4 x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos 4 y|}}}|17}} | |||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | |||
}}}}<!-- | |||
pos 5 | |||
-->{{#if:{{{pos 5|}}}|{{Map Overlay | |||
| layer = 0 | |||
| pos = {{{pos 5|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} | |||
| style = width:32px; height:32px; background:{{default|{{{highlight background|}}}|#5555FF}}; opacity:{{default|{{{highlight opacity|}}}|0.5}}; | |||
}}{{#if:{{{marker pos 5 x|}}}{{{marker pos 5 y|}}}|{{Map Overlay | |||
| layer = 1 | |||
| pos = {{{pos 5|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} + {{default|{{{marker pos 5 x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos 5 y|}}}|17}} | |||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | |||
}}}}<!-- | |||
pos 6 | |||
-->{{#if:{{{pos 6|}}}|{{Map Overlay | |||
| layer = 0 | |||
| pos = {{{pos 6|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} | |||
| style = width:32px; height:32px; background:{{default|{{{highlight background|}}}|#5555FF}}; opacity:{{default|{{{highlight opacity|}}}|0.5}}; | |||
}}{{#if:{{{marker pos 6 x|}}}{{{marker pos 6 y|}}}|{{Map Overlay | |||
| layer = 1 | |||
| pos = {{{pos 6|}}} | |||
| offset x = {{default|{{{highlight offset x|}}}|17}} + {{default|{{{marker pos 6 x|}}}|17}} | |||
| offset y = {{default|{{{highlight offset y|}}}|17}} + {{default|{{{marker pos 6 y|}}}|17}} | |||
| style = width:{{default|{{{marker size|}}}|5}}px; height:{{default|{{{marker size|}}}|5}}px; background:{{default|{{{marker background|}}}|#FF0000}}; opacity:{{default|{{{marker opacity|}}}|1}}; border-radius:{{default|{{{marker size|}}}|5}}px; | |||
}}}}<!-- | |||
close all if pos | |||
-->}}}}}}}}}}}} | |||
| text = [[{{#if:{{{map|}}}|{{{area}}}/Maps#{{{map}}}|{{{area}}}/Maps}}|{{default|{{{text|}}}|{{default|{{{pos|}}}<!-- | |||
-->{{#if:{{{pos 2|}}}|<nowiki> </nowiki>/ {{{pos 2}}}<!-- | |||
-->{{#if:{{{pos 3|}}}|<nowiki> </nowiki>/ {{{pos 3}}}<!-- | |||
-->{{#if:{{{pos 4|}}}|<nowiki> </nowiki>/ {{{pos 4}}}<!-- | |||
-->{{#if:{{{pos 5|}}}|<nowiki> </nowiki>/ {{{pos 5}}}<!-- | |||
-->{{#if:{{{pos 6|}}}|<nowiki> </nowiki>/ {{{pos 6}}}}}}}}}}}}}|{{{area}}}{{#if:{{{map|}}}|, {{{map}}}}}}}}}]] | |||
<!-- Potential implementation later | |||
{{#if:{{{marker size|}}} | |||
| | |||
| {{#if:{{{marker pos x|}}}{{{marker pos y|}}} | |||
| [{{{marker pos x|}}},{{{marker pos y|}}}] | |||
|}}}} | |||
--> | |||
}}}}}}</includeonly></onlyinclude> | }}}}}}</includeonly></onlyinclude> | ||
[[Category:Templates|{{PAGENAMEE}}]] | [[Category:Templates|{{PAGENAMEE}}]] | ||
Line 29: | Line 123: | ||
| area = | | area = | ||
| pos = | | pos = | ||
| pos 2 = | |||
| pos 3 = | |||
| pos 4 = | |||
| pos 5 = | |||
| pos 6 = | |||
| map = | | map = | ||
| id = | | id = | ||
Line 39: | Line 138: | ||
| highlight opacity = | | highlight opacity = | ||
| marker pos x = | | marker pos x = | ||
| marker pos y = | | marker pos y = | ||
| marker pos 2 x = | |||
| marker pos 2 y = | |||
| marker pos 3 x = | |||
| marker pos 3 y = | |||
| marker pos 4 x = | |||
| marker pos 4 y = | |||
| marker pos 5 x = | |||
| marker pos 5 y = | |||
| marker pos 6 x = | |||
| marker pos 6 y = | |||
| marker background = | | marker background = | ||
| marker opacity = | | marker opacity = | ||
Line 47: | Line 156: | ||
Displays a tooltip map of the area. | Displays a tooltip map of the area. | ||
*'''area''': The map's [[:Category:Areas|area]]. Required. | *'''area''': The map's [[:Category:Areas|area]]. Required. | ||
*'''pos''': The position within the map, such as H-6 or B-5. | *'''pos''': The position within the map, such as H-6 or B-5. | ||
**Optional: '''pos 2''', '''pos 3''', '''pos 4''', '''pos 5''', '''pos 6''' | |||
*'''map''': The specific map to be used, such as "Map 2". | *'''map''': The specific map to be used, such as "Map 2". | ||
*'''id''': A unique id to give to the tooltip. Use if the same location is repeated on the same page. | *'''id''': A unique id to give to the tooltip. Use if the same location is repeated on the same page. | ||
Line 57: | Line 167: | ||
*'''highlight background''': The background styling of the highlight box. | *'''highlight background''': The background styling of the highlight box. | ||
*'''highlight opacity ''': The opacity of the highlight box. | *'''highlight opacity ''': The opacity of the highlight box. | ||
*'''marker pos x''': The x position of the marker within the highlight box. | *'''marker pos x''': The x position of the marker within the highlight box. | ||
*'''marker pos y''': The y position of the marker within the highlight box. | **Optional: '''marker pos 2 x''', '''marker pos 3 x''', '''marker pos 4 x''', '''marker pos 5 x''', '''marker pos 6 x''' | ||
*'''marker pos y''': The y position of the marker within the highlight box. | |||
**Optional: '''marker pos 2 y''', '''marker pos 3 y''', '''marker pos 4 y''', '''marker pos 5 y''', '''marker pos 6 y''' | |||
*'''marker background''': The background styling of the marker. | *'''marker background''': The background styling of the marker. | ||
*'''marker opacity''': The opacity of the marker. | *'''marker opacity''': The opacity of the marker. | ||
Line 206: | Line 318: | ||
| marker opacity = 0.4 | | marker opacity = 0.4 | ||
| marker background = #5555ff | | marker background = #5555ff | ||
}} | |||
|- | |||
| | |||
<pre> | |||
{{Location Tooltip | |||
| area = Northern San d'Oria | |||
| pos = L-10 | |||
| pos 2 = L-11 | |||
| pos 3 = M-10 | |||
| pos 4 = M-11 | |||
}} | |||
</pre> | |||
| | |||
{{Location Tooltip | |||
| area = Northern San d'Oria | |||
| pos = L-10 | |||
| pos 2 = L-11 | |||
| pos 3 = M-10 | |||
| pos 4 = M-11 | |||
}} | }} | ||
|} | |} |
Latest revision as of 22:00, 16 August 2024
Usage
{{Location Tooltip | area = | pos = | pos 2 = | pos 3 = | pos 4 = | pos 5 = | pos 6 = | map = | id = | text = | tooltip = | opacity = | highlight offset x = | highlight offset y = | highlight background = | highlight opacity = | marker pos x = | marker pos y = | marker pos 2 x = | marker pos 2 y = | marker pos 3 x = | marker pos 3 y = | marker pos 4 x = | marker pos 4 y = | marker pos 5 x = | marker pos 5 y = | marker pos 6 x = | marker pos 6 y = | marker background = | marker opacity = | marker size = }}
Displays a tooltip map of the area.
- area: The map's area. Required.
- pos: The position within the map, such as H-6 or B-5.
- Optional: pos 2, pos 3, pos 4, pos 5, pos 6
- map: The specific map to be used, such as "Map 2".
- id: A unique id to give to the tooltip. Use if the same location is repeated on the same page.
- text: The text to display. Defaults to the pos if it is provided or the area and map if the pos is not provided.
- tooltip: The tooltip to display. Defaults to the labeled section in of the area maps subpage.
- opacity: The opacity of the tooltip.
- highlight offset x: An offset to correct the x positioning of the highlight box.
- highlight offset y: An offset to correct the y positioning of the highlight box.
- highlight background: The background styling of the highlight box.
- highlight opacity : The opacity of the highlight box.
- marker pos x: The x position of the marker within the highlight box.
- Optional: marker pos 2 x, marker pos 3 x, marker pos 4 x, marker pos 5 x, marker pos 6 x
- marker pos y: The y position of the marker within the highlight box.
- Optional: marker pos 2 y, marker pos 3 y, marker pos 4 y, marker pos 5 y, marker pos 6 y
- marker background: The background styling of the marker.
- marker opacity: The opacity of the marker.
- marker size: The size of the marker.
Examples
Code | Result |
---|---|
{{Location Tooltip | area = Windurst Walls }} |
|
{{Location Tooltip | area = Windurst Waters | map = South }} |
|
{{Location Tooltip | area = Northern San d'Oria | pos = L-10 }} |
|
{{Location Tooltip | tooltip = [[File:RuAunGardensMain.png]] | area = Ru'Aun Gardens | pos = H-10 }} |
|
{{Location Tooltip | tooltip = [[File:GarlaigeCitadel2.png]] | area = Garlaige Citadel | map = Map 2 | pos = G-6 }} |
|
{{Location Tooltip | tooltip = [[File:SouthernSandOria.png]] | area = Southern San d'Oria | pos = J-9 | marker pos x = 3 | marker pos y = 7 }} |
|
{{Location Tooltip | id = Derfland Regional Merchant | tooltip = [[File:SouthernSandOria.png]] | area = Southern San d'Oria | pos = J-9 | highlight background = transparent | marker pos x = 3 | marker pos y = 7 }} |
|
{{Location Tooltip | text = Valkurm Emperor | tooltip = [[File:Valkurm Dunes.png]] | area = Valkurm Dunes | pos = E-8 | highlight background = transparent | marker pos x = 2 | marker pos y = -7 | marker size = 35 | marker opacity = 0.4 | marker background = #5555ff }} |
|
{{Location Tooltip | area = Northern San d'Oria | pos = L-10 | pos 2 = L-11 | pos 3 = M-10 | pos 4 = M-11 }} |