mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-22 22:24:04 +00:00
Improve some method bindings to use specific Object subtypes
This was made possible by changes to `VariantCaster` which now make it possible to pass any `Object`-derived type as pointer.
This commit is contained in:
@@ -513,11 +513,9 @@ void EditorPlugin::add_tool_menu_item(const String &p_name, const Callable &p_ca
|
||||
EditorNode::get_singleton()->add_tool_menu_item(p_name, p_callable);
|
||||
}
|
||||
|
||||
void EditorPlugin::add_tool_submenu_item(const String &p_name, Object *p_submenu) {
|
||||
void EditorPlugin::add_tool_submenu_item(const String &p_name, PopupMenu *p_submenu) {
|
||||
ERR_FAIL_NULL(p_submenu);
|
||||
PopupMenu *submenu = Object::cast_to<PopupMenu>(p_submenu);
|
||||
ERR_FAIL_NULL(submenu);
|
||||
EditorNode::get_singleton()->add_tool_submenu_item(p_name, submenu);
|
||||
EditorNode::get_singleton()->add_tool_submenu_item(p_name, p_submenu);
|
||||
}
|
||||
|
||||
void EditorPlugin::remove_tool_menu_item(const String &p_name) {
|
||||
|
||||
Reference in New Issue
Block a user