tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Allow scripts to extend the tool bars

Open bjorn opened this issue 2 years ago • 4 comments

Currently scripts can register custom actions through tiled.registerAction and then they can add them to various menus using tiled.extendMenu. It is however not possible to extend a tool bar.

It should be possible for scripts to extend most of the existing tool bars, probably through a tiled.extendToolBar function.

bjorn avatar Mar 31 '22 07:03 bjorn

Somewhat related: It would be very useful if scripted Tools could have toggles to their tool-specific toolbar, like some of the native tools do. I suspect this would need to be done differently from extendToolbar though.

eishiya avatar Mar 31 '22 12:03 eishiya

@eishiya Yes, that's a somewhat different feature. Such actions or toggles are mostly just actions added to the tool bar, so I guess it would be best in this case to add a property to the ScriptedTool class that is an array of action IDs, which will be added to this tool bar.

bjorn avatar Mar 31 '22 12:03 bjorn

Alright, Tool.toolBarActions done. :-)

bjorn avatar Mar 31 '22 15:03 bjorn

Interested in tiled.extendToolBar as well

user72356 avatar Jul 04 '22 17:07 user72356