Replies: 3 comments 6 replies
-
Your code looks more or less fine, but the floating toolbox action needs to know where to show up, so you do you have to click somewhere after you press your keyboard accelerator for the plugin action. Moreover you have to use a toolbar with tools in the floating toolbox (the default one doesn't contain any), otherwise it won't work. This reminds me that we should add tools to the floating toolbox for all provided toolbars. In the development version (nightly build) tools can be duplicated throughout the toolbars, so there is no reason to keep the floating toolbox empty. Another question is how to customize the tools in the floating toolbox via the gui. Seems like currently one has to edit the Your function toolbox()
toggleBox = not toggleBox
app.uiAction({["action"] = "ACTION_TOOL_FLOATING_TOOLBOX", ["enabled"] = toggleBox});
end Also I noticed from the code, that function toolbox()
app.uiAction({["action"] = "ACTION_TOOL_FLOATING_TOOLBOX"});
end |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
If the floating toolbox is activated in the settings, then it shows up in the toolbar customization mode. To activate it in the settings, see Settings -> Drawing Area -> Action on tool tap. |
Beta Was this translation helpful? Give feedback.
-
I asked this in a comment but maybe it is worth to have a space on its own.
I want to write a plugin to bind the floating toolbox to a keyboard shortcut.
I have looked the documentation for plugins: it says it shouldn't be that difficult but I have not been able to do it :(
What I wrote in my plugin is as follows:
But it does not work: first, it opens the toolbox only after I click somewhere, instead of just opening the toolbox; second, I can not choose anything from the toolbox: the only thing I can do is to click another tool to exit the sort of waiting mode it puts itself into.
I guess I wrote some code really dumb, but I can't figure a way out.
Any help will be appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions