Merge pull request #51983 from reduz/remove-bind-vmethod

Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
This commit is contained in:
Juan Linietsky
2021-08-23 09:46:19 -03:00
committed by GitHub
4 changed files with 3 additions and 25 deletions

View File

@@ -1845,26 +1845,6 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
max_input_args = 0;
max_output_args = 0;
if (Object::cast_to<Node>(p_owner)) {
// Turn on these if they exist and base is a node.
Node *node = Object::cast_to<Node>(p_owner);
if (p_script->functions.has("_process")) {
node->set_process(true);
}
if (p_script->functions.has("_physics_process")) {
node->set_physics_process(true);
}
if (p_script->functions.has("_input")) {
node->set_process_input(true);
}
if (p_script->functions.has("_unhandled_input")) {
node->set_process_unhandled_input(true);
}
if (p_script->functions.has("_unhandled_key_input")) {
node->set_process_unhandled_key_input(true);
}
}
// Setup variables.
{
List<StringName> keys;

View File

@@ -1816,7 +1816,7 @@ void VisualScriptEditor::_generic_search(String p_base_type, Vector2 pos, bool n
}
}
void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) {
void VisualScriptEditor::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
// GUI input for VS Editor Plugin
@@ -4246,8 +4246,6 @@ void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("_can_drop_data_fw", &VisualScriptEditor::can_drop_data_fw);
ClassDB::bind_method("_drop_data_fw", &VisualScriptEditor::drop_data_fw);
ClassDB::bind_method("_input", &VisualScriptEditor::_input);
ClassDB::bind_method("_update_graph_connections", &VisualScriptEditor::_update_graph_connections);
ClassDB::bind_method("_update_members", &VisualScriptEditor::_update_members);

View File

@@ -234,7 +234,7 @@ class VisualScriptEditor : public ScriptEditorBase {
void _generic_search(String p_base_type = "", Vector2 pos = Vector2(), bool node_centered = false);
void _input(const Ref<InputEvent> &p_event);
virtual void input(const Ref<InputEvent> &p_event) override;
void _graph_gui_input(const Ref<InputEvent> &p_event);
void _members_gui_input(const Ref<InputEvent> &p_event);
void _fn_name_box_input(const Ref<InputEvent> &p_event);

View File

@@ -55,7 +55,7 @@ void VisualScriptPropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
search_options->call("_gui_input", k);
search_options->gui_input(k);
search_box->accept_event();
TreeItem *root = search_options->get_root();