Define Mouse Tools

You can define mouse tools and call them from the rollout of an MCG tool.

To do this, simply define a mouse tool in the usual way and add a button to call it in the Custom UI property.

For example:

-- Define mouse tool before it is called
tool myMouseCapture 
( 
    on mousePoint click do 
    (
        format "Captured click!!! % \n" click 
    ) 
--Right-Click to stop 
) 
  
rollout params "Parameters" 
( 
-- Restore the default rollout 
<<ParamUIDefs>> 
<<RolloutParamsHandlers>>

-- Define button to start mouse tool
    button ToolStart "Begin Mouse Capture" width:140 
    on ToolStart pressed do 
        (
            startTool myMouseCapture 
        ) 
)