Enum EditorContextMenuPlugin.ContextMenuSlot
- Namespace
- Godot
- Assembly
- GodotSharpEditor.dll
public enum EditorContextMenuPlugin.ContextMenuSlot : long
Fields
Filesystem = 1
Context menu of FileSystem dock. _PopupMenu(string[]) and option callback will be called with list of paths of the currently selected files.
FilesystemCreate = 3
The "Create..." submenu of FileSystem dock's context menu. _PopupMenu(string[]) and option callback will be called with list of paths of the currently selected files.
SceneTabs = 5
Context menu of scene tabs. _PopupMenu(string[]) will be called with the path of the clicked scene, or empty string[] if the menu was opened on empty space. The option callback will receive the path of the clicked scene, or empty string if none was clicked.
SceneTree = 0
Context menu of Scene dock. _PopupMenu(string[]) will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes.
ScriptEditor = 2
Context menu of Script editor's script tabs. _PopupMenu(string[]) will be called with the path to the currently edited script, while option callback will receive reference to that script.
ScriptEditorCode = 4
Context menu of Script editor's code editor. _PopupMenu(string[]) will be called with the path to the CodeEdit node. You can fetch it using this code:
func _popup_menu(paths): var code_edit = Engine.get_main_loop().root.get_node(paths[0]);
The option callback will receive reference to that node. You can use CodeEdit methods to perform symbol lookups etc.
Slot2DEditor = 6
Context menu of 2D editor's basic right-click menu. _PopupMenu(string[]) will be called with paths to all CanvasItem nodes under the cursor. You can fetch them using this code:
func _popup_menu(paths): var canvas_item = Engine.get_main_loop().root.get_node(paths[0]); # Replace 0 with the desired index.
The paths array is empty if there weren't any nodes under cursor. The option callback will receive a typed array of CanvasItem nodes.