Plugin for adding custom context menus in the editor.
[EditorContextMenuPlugin] allows for the addition of custom options in the editor's context menu.
Currently, context menus are supported for three commonly used areas: the file system, scene tree, and editor script list panel.
Called when creating a context menu, custom options can be added by using the [method add_context_menu_item] function.
Add custom options to the context menu of the currently specified slot.
To trigger a [param shortcut] before the context menu is created, please additionally call the [method add_menu_shortcut] function.
[codeblock]
func _popup_menu(paths):
add_context_menu_item("File Custom options", handle, ICON)
[/codeblock]
To register the shortcut for the context menu, call this function within the [method Object._init] function, even if the context menu has not been created yet.
Note that this method should only be invoked from [method Object._init]; otherwise, the shortcut will not be registered correctly.
[codeblock]
func _init():
add_menu_shortcut(SHORTCUT, handle);
[/codeblock]