Interacting with default tools after activating custom tool

I’m not using that because of this bug.

I will give onMouseEnter and onMouseOut a try later today, but I think I’ve convinced myself that I want to continue with the command approach instead.

Speaking of which, I’m not even creating a UI::Command object explicitly. My tool-based implementation is roughly along the lines of:

menu.add_item('My Item') {
  dialog = UI::HtmlDialog.new(...)
  
  tool = Tool.new(dialog)
  Sketchup.active_model.tools.push_tool(tool)

  dialog.add_action_callback('click') { |action_context, arg|
    main_func(tool, arg)
  }
  
  dialog.set_on_closed { 
    Sketchup.active_model.tools.pop_tool 
  }

  dialog.set_file('html/test.html')
  dialog.show
}

Note that I don’t want to include a toolbar button as having an item in the menu bar is just fine.