summaryrefslogtreecommitdiff
path: root/editor/scene_tree_dock.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-08-22 12:37:22 -0300
committerreduz <reduzio@gmail.com>2021-08-23 08:10:13 -0300
commit5cecdfa8afb91a60305b429f5b738e27dadbc83f (patch)
tree40bf21e1beae1a6883770d2ac0473222ff41ae65 /editor/scene_tree_dock.cpp
parent2d446771d6701bb77432b6df5a768e53c9a6c95d (diff)
Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r--editor/scene_tree_dock.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 0b228c2695..2ec4a088a2 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -62,7 +62,7 @@ void SceneTreeDock::_quick_open() {
instantiate_scenes(quick_open->get_selected_files(), scene_tree->get_selected());
}
-void SceneTreeDock::_input(Ref<InputEvent> p_event) {
+void SceneTreeDock::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> mb = p_event;
@@ -72,7 +72,7 @@ void SceneTreeDock::_input(Ref<InputEvent> p_event) {
}
}
-void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
+void SceneTreeDock::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (get_focus_owner() && get_focus_owner()->is_text_field()) {
@@ -3163,8 +3163,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_
void SceneTreeDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
- ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &SceneTreeDock::_unhandled_key_input);
- ClassDB::bind_method(D_METHOD("_input"), &SceneTreeDock::_input);
+
ClassDB::bind_method(D_METHOD("_update_script_button"), &SceneTreeDock::_update_script_button);
ClassDB::bind_method(D_METHOD("instantiate"), &SceneTreeDock::instantiate);