Include the plugin's xml file:
<include url="plugins/tooltip.xml" />
Then, on each layer on which you wish to display a tooltip add a "tooltip" style, and a tooltip attribute containing the text of the toolip. For example:
<layer name="some_layer" style="tooltip" tooltip="Tooltip text" tooltip_style="another_tooltip_style" tooltip_oy="2" ... />
Optionally you can add the attributes tooltip_style and/or tooltip_oy to override the global tooltip settings (see Settings below) on a per layer basis.
Usage on hotspots / layers that define an onloaded eventThe tooltip style that you add to a layer just contains an onloaded event, that calls an action to setup the tooltip there.
When using on hotspots, for example, you probably want to get the tooltip text dinamically from the linked scene title. For that we need to use the onloaded event too, and as one onloaded definition would override the other, we'll need to call the setup action manually on the defined hotspot's onloaded event.
<hotspot name="hotspot_x" style="hotspot" linkedscene="scene_x" onloaded="copy(tooltip, scene[get(linkedscene)].title); setup_tooltip(get(name));" ... />
Check out the example's XML source at the bottom of the page for more complete examples.
These are all the possible settings and their default values.
<settings name="tooltip" style="default_tooltip_style" oy="0" visible="true" />
This is the default tooltip style, which will be used if you don't specify one in the settings. These are also all the possible attributes that the tooltip accepts for styling.
<style name="default_tooltip_style" font_color="FFFFFF" font_family="sans-serif" html5_font_family="" font_size="12" font_weight="normal" embeddedfonts="false" padding="6 8" roundedge="10" background="true" backgroundcolor="0x000000" backgroundalpha="1.0" border="false" bordercolor="0x000000" borderalpha="1.0" borderwidth="1.0" shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0xFFFFFF" shadowalpha="1.0" textshadow="0.0" textshadowrange="4.0" textshadowangle="45" textshadowcolor="0x000000" textshadowalpha="1.0" />