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:
Rémi Verschelde 2022-01-28 15:06:54 +01:00
parent 38c6611b91
commit 7072b359b4
No known key found for this signature in database
GPG key ID: C3336907360768E1
15 changed files with 54 additions and 83 deletions

View file

@ -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) {