Tooltip plugin

If you have the VastPark Player installed, download the example IMML file below and open the demo in the VastPark Player.

Overview

Demonstrates usage of the tooltip plugin.

Instructions

Mouse over the transform gizmo's for a tooltip to appear. Click the gizmo to enter that transform mode.

  1. Click box 1 to activate move mode
  2. Click box 2 to activate rotate mode
  3. Click box 3 to activate scale mode
  4. Click and drag box 4 to transform according to the mode that was selected.

Note

The attached tooltip-plugin2.imml file is compatible with 1.5. Models which did not exist were simply removed and the primitives were adjusted to serve in their place. Works in a similar fashion to the first.

Walkthrough

The demo uses both the element transformer and the tooltip plugin; However, its main focus is the tooltip plugin.

1 if(obj.name == 'Transform-Gizmo-Move') then
2 
3    -- ASSIGN THE TOOLTIP TO THE OBJECT VIA THE PLUGIN
4    tooltipid = tooltipplugin:add('Move Mode\r\nCurrently Enabled: '..convert:tostring(scene:get('movemode')), obj)
5    -- ASSIGN THE TOOLTIP ID TO THE TOOLTIPID OBJECT VARIABLE
6    -- THIS WILL BE USED LATER FOR REMOVING THE TOOLTIP
7    obj:set('tooltipid', tooltipid)

The comments explain alot about what is going on, but what is important here is the code on line 4. Where the content of the tooltip is assigned. Note the string accepts escape characters such as "\r\n"

See Also

Element transformer

tooltip-plugin.imml - Requires Player v1.3 (12.6 kB) Tim Glew, 01/13/2011 07:59 am

TooltipTurorial.png (111.2 kB) Ian Tan, 02/22/2011 04:14 am

tooltip-plugin2.imml - Removed Metaforik URIs, replaced with S3 URIs (11.1 kB) Ian Tan, 05/16/2011 03:17 am