overwriting callMenu isn't wise as you could alias it.
also, "var" to a parameters is unnecessary to use.
but I dont see what the exact use is, as you could make a menu command
to a common event easier which is also safer than "callMenu" function.
this could bring more issues later and conflict with the callMenu.
it's nice for a small project that doesn't use much plugin, for not for bigger projects
or project with more than 20 plugins.
callMenu is something you cannot touch, but target the
Scene._Menu.prototype.AddMenu Commands to add menu commands.
that common targetting the common event to run when you click on it.
what it does currently, is run a common event when the menu is called
directly, not sure why, as calling the menu and run a common event with
text before accessing the menu in general can be annoying.
that is personal opinion, I like the idea, if there is a specific reason for it to run.
but menu plugins adding command add this feature fairly easy.
the only way I see a nice way for this if aliased on the function is to make
sparkling to open the menu, but the events and stuff need to continue and
not freezing 🙂