You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Add submenu support to EditorContextMenuPlugin
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
||||
Callable callable;
|
||||
Ref<Texture2D> icon;
|
||||
Ref<Shortcut> shortcut;
|
||||
PopupMenu *submenu = nullptr;
|
||||
};
|
||||
HashMap<String, ContextMenuItem> context_menu_items;
|
||||
HashMap<Ref<Shortcut>, Callable> context_menu_shortcuts;
|
||||
@@ -80,6 +81,7 @@ public:
|
||||
void add_menu_shortcut(const Ref<Shortcut> &p_shortcut, const Callable &p_callable);
|
||||
void add_context_menu_item(const String &p_name, const Callable &p_callable, const Ref<Texture2D> &p_texture);
|
||||
void add_context_menu_item_from_shortcut(const String &p_name, const Ref<Shortcut> &p_shortcut, const Ref<Texture2D> &p_texture);
|
||||
void add_context_submenu_item(const String &p_name, PopupMenu *p_menu, const Ref<Texture2D> &p_texture);
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(EditorContextMenuPlugin::ContextMenuSlot);
|
||||
|
||||
Reference in New Issue
Block a user