diff options
Diffstat (limited to 'tools/editor')
69 files changed, 134 insertions, 134 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 084b4edc7e..3bfcf6ac28 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -157,7 +157,7 @@ private: } } - void _input_event(const InputEvent& p_ev) { + void _gui_input(const InputEvent& p_ev) { if (p_ev.type==InputEvent::MOUSE_MOTION && p_ev.mouse_motion.button_mask&BUTTON_MASK_LEFT) { if (mode==MODE_DISABLED) @@ -199,7 +199,7 @@ public: static void _bind_methods() { // ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj); - ClassDB::bind_method("_input_event",&AnimationCurveEdit::_input_event); + ClassDB::bind_method("_gui_input",&AnimationCurveEdit::_gui_input); ADD_SIGNAL(MethodInfo("transition_changed")); } @@ -1811,7 +1811,7 @@ void AnimationKeyEditor::_anim_delete_keys() { } } -void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { +void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) { Control *te=track_editor; Ref<StyleBox> style = get_stylebox("normal","TextEdit"); @@ -3859,7 +3859,7 @@ void AnimationKeyEditor::_bind_methods() { ClassDB::bind_method(_MD("_animation_changed"),&AnimationKeyEditor::_animation_changed); ClassDB::bind_method(_MD("_scroll_changed"),&AnimationKeyEditor::_scroll_changed); - ClassDB::bind_method(_MD("_track_editor_input_event"),&AnimationKeyEditor::_track_editor_input_event); + ClassDB::bind_method(_MD("_track_editor_gui_input"),&AnimationKeyEditor::_track_editor_gui_input); ClassDB::bind_method(_MD("_track_name_changed"),&AnimationKeyEditor::_track_name_changed); ClassDB::bind_method(_MD("_track_menu_selected"),&AnimationKeyEditor::_track_menu_selected); ClassDB::bind_method(_MD("_menu_add_track"),&AnimationKeyEditor::_menu_add_track); @@ -4082,7 +4082,7 @@ AnimationKeyEditor::AnimationKeyEditor() { track_editor = memnew( Control ); track_editor->connect("draw",this,"_track_editor_draw"); hb->add_child(track_editor); - track_editor->connect("input_event",this,"_track_editor_input_event"); + track_editor->connect("gui_input",this,"_track_editor_gui_input"); track_editor->set_focus_mode(Control::FOCUS_ALL); track_editor->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h index 8113853920..10cc1bf611 100644 --- a/tools/editor/animation_editor.h +++ b/tools/editor/animation_editor.h @@ -274,7 +274,7 @@ class AnimationKeyEditor : public VBoxContainer { float _get_zoom_scale() const; void _track_editor_draw(); - void _track_editor_input_event(const InputEvent& p_input); + void _track_editor_gui_input(const InputEvent& p_input); void _track_pos_draw(); diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 9c7626d79e..72c547e982 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -995,7 +995,7 @@ FindReplaceDialog::FindReplaceDialog() { /*** CODE EDITOR ****/ -void CodeTextEditor::_text_editor_input_event(const InputEvent& p_event) { +void CodeTextEditor::_text_editor_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_BUTTON) { @@ -1195,7 +1195,7 @@ void CodeTextEditor::_notification(int p_what) { void CodeTextEditor::_bind_methods() { - ClassDB::bind_method("_text_editor_input_event",&CodeTextEditor::_text_editor_input_event); + ClassDB::bind_method("_text_editor_gui_input",&CodeTextEditor::_text_editor_gui_input); ClassDB::bind_method("_line_col_changed",&CodeTextEditor::_line_col_changed); ClassDB::bind_method("_text_changed",&CodeTextEditor::_text_changed); ClassDB::bind_method("_on_settings_change",&CodeTextEditor::_on_settings_change); @@ -1297,7 +1297,7 @@ CodeTextEditor::CodeTextEditor() { col_nb->set_autowrap(true); // workaround to prevent resizing the label on each change col_nb->set_custom_minimum_size(Size2(40,1)*EDSCALE); - text_editor->connect("input_event", this,"_text_editor_input_event"); + text_editor->connect("gui_input", this,"_text_editor_gui_input"); text_editor->connect("cursor_changed", this,"_line_col_changed"); text_editor->connect("text_changed", this,"_text_changed"); text_editor->connect("request_completion", this,"_complete_request"); diff --git a/tools/editor/code_editor.h b/tools/editor/code_editor.h index 75bad24483..a000f02010 100644 --- a/tools/editor/code_editor.h +++ b/tools/editor/code_editor.h @@ -217,7 +217,7 @@ class CodeTextEditor : public VBoxContainer { void _complete_request(); void _font_resize_timeout(); - void _text_editor_input_event(const InputEvent& p_event); + void _text_editor_gui_input(const InputEvent& p_event); void _zoom_in(); void _zoom_out(); void _reset_zoom(); diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 87f043783f..313b1ad182 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -141,7 +141,7 @@ void CreateDialog::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - search_options->call("_input_event",p_ie); + search_options->call("_gui_input",p_ie); search_box->accept_event(); } @@ -682,7 +682,7 @@ CreateDialog::CreateDialog() { favorite->connect("pressed",this,"_favorite_toggled"); vbc->add_margin_child(TTR("Search:"),search_hb); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Create")); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 5af6b154a8..77007526ad 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -71,7 +71,7 @@ void EditorHelpSearch::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - search_options->call("_input_event",p_ie); + search_options->call("_gui_input",p_ie); search_box->accept_event(); } @@ -324,7 +324,7 @@ EditorHelpSearch::EditorHelpSearch() { sb_hb->add_child(sb); vbc->add_margin_child(TTR("Search:"),sb_hb); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Open")); @@ -488,7 +488,7 @@ void EditorHelpIndex::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - class_list->call("_input_event",p_ie); + class_list->call("_gui_input",p_ie); search_box->accept_event(); } } @@ -517,7 +517,7 @@ EditorHelpIndex::EditorHelpIndex() { register_text_enter(search_box); search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("input_event", this, "_sbox_input"); + search_box->connect("gui_input", this, "_sbox_input"); class_list = memnew( Tree ); vbc->add_margin_child(TTR("Class List:")+" ", class_list, true); @@ -1824,7 +1824,7 @@ EditorHelp::EditorHelp() { pc->add_child(class_desc); class_desc->set_area_as_parent_rect(8); class_desc->connect("meta_clicked",this,"_class_desc_select"); - class_desc->connect("input_event",this,"_class_desc_input"); + class_desc->connect("gui_input",this,"_class_desc_input"); } class_desc->get_v_scroll()->connect("value_changed",this,"_scroll_changed"); diff --git a/tools/editor/editor_name_dialog.cpp b/tools/editor/editor_name_dialog.cpp index 49e44a55c2..e7dcea4d40 100644 --- a/tools/editor/editor_name_dialog.cpp +++ b/tools/editor/editor_name_dialog.cpp @@ -31,7 +31,7 @@ #include "object_type_db.h" #include "os/keyboard.h" -void EditorNameDialog::_line_input_event(const InputEvent& p_event) { +void EditorNameDialog::_line_gui_input(const InputEvent& p_event) { if (p_event.type == InputEvent::KEY) { @@ -72,7 +72,7 @@ void EditorNameDialog::ok_pressed() { void EditorNameDialog::_bind_methods() { - ClassDB::bind_method("_line_input_event",&EditorNameDialog::_line_input_event); + ClassDB::bind_method("_line_gui_input",&EditorNameDialog::_line_gui_input); ADD_SIGNAL(MethodInfo("name_confirmed",PropertyInfo( Variant::STRING,"name"))); } @@ -85,5 +85,5 @@ EditorNameDialog::EditorNameDialog() name->set_margin(MARGIN_TOP,5); name->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5); name->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5); - name->connect("input_event", this, "_line_input_event"); + name->connect("gui_input", this, "_line_gui_input"); } diff --git a/tools/editor/editor_name_dialog.h b/tools/editor/editor_name_dialog.h index f4bac7f1d9..d6bc7eca94 100644 --- a/tools/editor/editor_name_dialog.h +++ b/tools/editor/editor_name_dialog.h @@ -39,7 +39,7 @@ class EditorNameDialog : public ConfirmationDialog { LineEdit *name; - void _line_input_event(const InputEvent& p_event); + void _line_gui_input(const InputEvent& p_event); protected: diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index bcdc2cbbf0..914f06ca5d 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -5618,7 +5618,7 @@ EditorNode::EditorNode() { dock_select = memnew( Control ); dock_select->set_custom_minimum_size(Size2(128,64)*EDSCALE); - dock_select->connect("input_event",this,"_dock_select_input"); + dock_select->connect("gui_input",this,"_dock_select_input"); dock_select->connect("draw",this,"_dock_select_draw"); dock_select->connect("mouse_exit",this,"_dock_popup_exit"); dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -6785,12 +6785,12 @@ void EditorPluginList::edit(Object* p_object) { } -bool EditorPluginList::forward_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { +bool EditorPluginList::forward_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { bool discard = false; for (int i = 0; i < plugins_list.size(); i++) { - if (plugins_list[i]->forward_canvas_input_event(p_canvas_xform,p_event)) { + if (plugins_list[i]->forward_canvas_gui_input(p_canvas_xform,p_event)) { discard = true; } } @@ -6798,11 +6798,11 @@ bool EditorPluginList::forward_input_event(const Matrix32& p_canvas_xform,const return discard; } -bool EditorPluginList::forward_spatial_input_event(Camera* p_camera, const InputEvent& p_event) { +bool EditorPluginList::forward_spatial_gui_input(Camera* p_camera, const InputEvent& p_event) { bool discard = false; for (int i = 0; i < plugins_list.size(); i++) { - if (plugins_list[i]->forward_spatial_input_event(p_camera, p_event)) { + if (plugins_list[i]->forward_spatial_gui_input(p_camera, p_event)) { discard = true; } } diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 8eebaf3d5c..90162e0082 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -793,8 +793,8 @@ public: void make_visible(bool p_visible); void edit(Object *p_object); - bool forward_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event); - bool forward_spatial_input_event(Camera* p_camera, const InputEvent& p_event); + bool forward_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event); + bool forward_spatial_gui_input(Camera* p_camera, const InputEvent& p_event); void forward_draw_over_canvas(const Matrix32& p_canvas_xform,Control* p_canvas); void clear(); bool empty(); diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp index 9053d9bde0..191881292f 100644 --- a/tools/editor/editor_path.cpp +++ b/tools/editor/editor_path.cpp @@ -67,7 +67,7 @@ void EditorPath::_add_children_to_popup(Object* p_obj,int p_depth) { } } -void EditorPath::_input_event(const InputEvent& p_event) { +void EditorPath::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT && p_event.mouse_button.pressed) { @@ -198,7 +198,7 @@ void EditorPath::_popup_select(int p_idx) { void EditorPath::_bind_methods() { - ClassDB::bind_method("_input_event",&EditorPath::_input_event); + ClassDB::bind_method("_gui_input",&EditorPath::_gui_input); ClassDB::bind_method("_popup_select",&EditorPath::_popup_select); } diff --git a/tools/editor/editor_path.h b/tools/editor/editor_path.h index 47ba4ea3de..fd5b469d07 100644 --- a/tools/editor/editor_path.h +++ b/tools/editor/editor_path.h @@ -46,7 +46,7 @@ class EditorPath : public Control { EditorPath(); void _popup_select(int p_idx); - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _add_children_to_popup(Object* p_obj,int p_depth=0); protected: diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp index a19e520c1a..5722fc556a 100644 --- a/tools/editor/editor_plugin.cpp +++ b/tools/editor/editor_plugin.cpp @@ -141,10 +141,10 @@ Ref<SpatialEditorGizmo> EditorPlugin::create_spatial_gizmo(Spatial* p_spatial) { return Ref<SpatialEditorGizmo>(); } -bool EditorPlugin::forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { +bool EditorPlugin::forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { - if (get_script_instance() && get_script_instance()->has_method("forward_canvas_input_event")) { - return get_script_instance()->call("forward_canvas_input_event",p_canvas_xform,p_event); + if (get_script_instance() && get_script_instance()->has_method("forward_canvas_gui_input")) { + return get_script_instance()->call("forward_canvas_gui_input",p_canvas_xform,p_event); } return false; } @@ -160,10 +160,10 @@ void EditorPlugin::update_canvas() { CanvasItemEditor::get_singleton()->get_viewport_control()->update(); } -bool EditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { +bool EditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) { - if (get_script_instance() && get_script_instance()->has_method("forward_spatial_input_event")) { - return get_script_instance()->call("forward_spatial_input_event",p_camera,p_event); + if (get_script_instance() && get_script_instance()->has_method("forward_spatial_gui_input")) { + return get_script_instance()->call("forward_spatial_gui_input",p_camera,p_event); } return false; @@ -377,9 +377,9 @@ void EditorPlugin::_bind_methods() { ClassDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout); ClassDB::bind_method(_MD("edit_resource"),&EditorPlugin::edit_resource); - ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_canvas_input_event",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event"))); + ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_canvas_gui_input",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event"))); ClassDB::add_virtual_method(get_class_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control"))); - ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_spatial_input_event",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event"))); + ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_spatial_gui_input",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event"))); MethodInfo gizmo = MethodInfo(Variant::OBJECT,"create_spatial_gizmo",PropertyInfo(Variant::OBJECT,"for_spatial:Spatial")); gizmo.return_val.hint=PROPERTY_HINT_RESOURCE_TYPE; gizmo.return_val.hint_string="EditorSpatialGizmo"; diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h index c8fd1c2256..cfa309be11 100644 --- a/tools/editor/editor_plugin.h +++ b/tools/editor/editor_plugin.h @@ -104,9 +104,9 @@ public: void edit_resource(const Ref<Resource>& p_resource); virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial); - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform, const InputEvent& p_event); + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform, const InputEvent& p_event); virtual void forward_draw_over_canvas(const Matrix32& p_canvas_xform,Control *p_canvas); - virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event); + virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); virtual String get_name() const; virtual bool has_main_screen() const; virtual void make_visible(bool p_visible); diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp index 5a6de2fa1a..54b9de7622 100644 --- a/tools/editor/editor_profiler.cpp +++ b/tools/editor/editor_profiler.cpp @@ -713,7 +713,7 @@ EditorProfiler::EditorProfiler() graph->set_stop_mouse(true); graph->set_ignore_mouse(false); graph->connect("draw",this,"_graph_tex_draw"); - graph->connect("input_event",this,"_graph_tex_input"); + graph->connect("gui_input",this,"_graph_tex_input"); graph->connect("mouse_exit",this,"_graph_tex_mouse_exit"); h_split->add_child(graph); diff --git a/tools/editor/pane_drag.cpp b/tools/editor/pane_drag.cpp index f328f88b6f..122abd37b9 100644 --- a/tools/editor/pane_drag.cpp +++ b/tools/editor/pane_drag.cpp @@ -29,7 +29,7 @@ #include "pane_drag.h" -void PaneDrag::_input_event(const InputEvent& p_input) { +void PaneDrag::_gui_input(const InputEvent& p_input) { if (p_input.type==InputEvent::MOUSE_MOTION && p_input.mouse_motion.button_mask&BUTTON_MASK_LEFT) { @@ -64,7 +64,7 @@ Size2 PaneDrag::get_minimum_size() const { void PaneDrag::_bind_methods() { - ClassDB::bind_method("_input_event",&PaneDrag::_input_event); + ClassDB::bind_method("_gui_input",&PaneDrag::_gui_input); ADD_SIGNAL(MethodInfo("dragged",PropertyInfo(Variant::VECTOR2,"amount"))); } diff --git a/tools/editor/pane_drag.h b/tools/editor/pane_drag.h index 83b145e2e6..8796fc2594 100644 --- a/tools/editor/pane_drag.h +++ b/tools/editor/pane_drag.h @@ -40,7 +40,7 @@ class PaneDrag : public Control { protected: - void _input_event(const InputEvent& p_input); + void _gui_input(const InputEvent& p_input); void _notification(int p_what); virtual Size2 get_minimum_size() const; static void _bind_methods(); diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 4cc396a57b..7029200b61 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -50,7 +50,7 @@ void AnimationPlayerEditor::_node_removed(Node *p_node) { } } -void AnimationPlayerEditor::_input_event(InputEvent p_event) { +void AnimationPlayerEditor::_gui_input(InputEvent p_event) { } @@ -1245,7 +1245,7 @@ void AnimationPlayerEditor::_unhandled_key_input(const InputEvent& p_ev) { void AnimationPlayerEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&AnimationPlayerEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&AnimationPlayerEditor::_gui_input); ClassDB::bind_method(_MD("_node_removed"),&AnimationPlayerEditor::_node_removed); ClassDB::bind_method(_MD("_play_pressed"),&AnimationPlayerEditor::_play_pressed); ClassDB::bind_method(_MD("_play_from_pressed"),&AnimationPlayerEditor::_play_from_pressed); diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h index dc37c77701..9074eb127b 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.h +++ b/tools/editor/plugins/animation_player_editor_plugin.h @@ -171,7 +171,7 @@ class AnimationPlayerEditor : public VBoxContainer { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); void _node_removed(Node *p_node); static void _bind_methods(); public: diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index 27976a6f16..80ededc172 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -759,7 +759,7 @@ void AnimationTreeEditor::_node_edit_property(const StringName& p_node) { } #endif -void AnimationTreeEditor::_input_event(InputEvent p_event) { +void AnimationTreeEditor::_gui_input(InputEvent p_event) { switch(p_event.type) { @@ -1325,7 +1325,7 @@ void AnimationTreeEditor::_bind_methods() { ClassDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item ); ClassDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item ); - ClassDB::bind_method( "_input_event", &AnimationTreeEditor::_input_event ); + ClassDB::bind_method( "_gui_input", &AnimationTreeEditor::_gui_input ); // ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed ); ClassDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved ); ClassDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds ); diff --git a/tools/editor/plugins/animation_tree_editor_plugin.h b/tools/editor/plugins/animation_tree_editor_plugin.h index 36c64bfcd5..253ad1878d 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.h +++ b/tools/editor/plugins/animation_tree_editor_plugin.h @@ -160,7 +160,7 @@ class AnimationTreeEditor : public Control { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 168b41e51f..00696d4de7 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1064,7 +1064,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) { } -void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { +void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) { { @@ -1072,7 +1072,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); if (!over_plugin_list->empty()) { - bool discard = over_plugin_list->forward_input_event(transform,p_event); + bool discard = over_plugin_list->forward_gui_input(transform,p_event); if (discard) { accept_event(); return; @@ -3209,7 +3209,7 @@ void CanvasItemEditor::_bind_methods() { ClassDB::bind_method("_keying_changed",&CanvasItemEditor::_keying_changed); ClassDB::bind_method("_unhandled_key_input",&CanvasItemEditor::_unhandled_key_input); ClassDB::bind_method("_viewport_draw",&CanvasItemEditor::_viewport_draw); - ClassDB::bind_method("_viewport_input_event",&CanvasItemEditor::_viewport_input_event); + ClassDB::bind_method("_viewport_gui_input",&CanvasItemEditor::_viewport_gui_input); ClassDB::bind_method("_snap_changed",&CanvasItemEditor::_snap_changed); ClassDB::bind_method(_MD("_selection_result_pressed"),&CanvasItemEditor::_selection_result_pressed); ClassDB::bind_method(_MD("_selection_menu_hide"),&CanvasItemEditor::_selection_menu_hide); @@ -3351,7 +3351,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { viewport->add_child(h_scroll); viewport->add_child(v_scroll); viewport->connect("draw",this,"_viewport_draw"); - viewport->connect("input_event",this,"_viewport_input_event"); + viewport->connect("gui_input",this,"_viewport_gui_input"); h_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),true); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h index de6d0c088f..f74df9d6e0 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.h +++ b/tools/editor/plugins/canvas_item_editor_plugin.h @@ -353,7 +353,7 @@ class CanvasItemEditor : public VBoxContainer { void _unhandled_key_input(const InputEvent& p_ev); - void _viewport_input_event(const InputEvent& p_event); + void _viewport_gui_input(const InputEvent& p_event); void _viewport_draw(); void _focus_selection(int p_op); diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp index e6e8d94d78..6ea8e35188 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -99,7 +99,7 @@ void CollisionPolygon2DEditor::_wip_close() { edited_point=-1; } -bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) { +bool CollisionPolygon2DEditor::forward_gui_input(const InputEvent& p_event) { if (!node) diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h index 5230867515..89f5ed9f06 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h @@ -81,7 +81,7 @@ protected: static void _bind_methods(); public: - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_collision_polygon); CollisionPolygon2DEditor(EditorNode *p_editor); }; @@ -95,7 +95,7 @@ class CollisionPolygon2DEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual String get_name() const { return "CollisionPolygon2D"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp index 1aea1bdfdb..fcf6c401e9 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp @@ -109,7 +109,7 @@ void CollisionPolygonEditor::_wip_close() { } -bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { +bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) { if (!node) return false; diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.h b/tools/editor/plugins/collision_polygon_editor_plugin.h index 2434a24cc8..cd722048db 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.h +++ b/tools/editor/plugins/collision_polygon_editor_plugin.h @@ -92,7 +92,7 @@ protected: static void _bind_methods(); public: - virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event); + virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); void edit(Node *p_collision_polygon); CollisionPolygonEditor(EditorNode *p_editor); ~CollisionPolygonEditor(); @@ -107,7 +107,7 @@ class CollisionPolygonEditorPlugin : public EditorPlugin { public: - virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { return collision_polygon_editor->forward_spatial_input_event(p_camera,p_event); } + virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) { return collision_polygon_editor->forward_spatial_gui_input(p_camera,p_event); } virtual String get_name() const { return "CollisionPolygon"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp index 3761ab6185..a7b8e1d704 100644 --- a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -303,7 +303,7 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant& p_org) { undo_redo->commit_action(); } -bool CollisionShape2DEditor::forward_input_event(const InputEvent& p_event) { +bool CollisionShape2DEditor::forward_gui_input(const InputEvent& p_event) { if (!node) { return false; diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.h b/tools/editor/plugins/collision_shape_2d_editor_plugin.h index 2ea7ae9535..589f7ae9f8 100644 --- a/tools/editor/plugins/collision_shape_2d_editor_plugin.h +++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.h @@ -73,7 +73,7 @@ protected: static void _bind_methods(); public: - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node* p_node); CollisionShape2DEditor(EditorNode* p_editor); @@ -86,7 +86,7 @@ class CollisionShape2DEditorPlugin : public EditorPlugin { EditorNode* editor; public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_shape_2d_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_shape_2d_editor->forward_gui_input(p_event); } virtual String get_name() const { return "CollisionShape2D"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp index 9d49cccac4..c5aec62407 100644 --- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -102,7 +102,7 @@ void LightOccluder2DEditor::_wip_close(bool p_closed) { edited_point=-1; } -bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) { +bool LightOccluder2DEditor::forward_gui_input(const InputEvent& p_event) { if (!node) diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.h b/tools/editor/plugins/light_occluder_2d_editor_plugin.h index c5c692dbc7..8f96e44df5 100644 --- a/tools/editor/plugins/light_occluder_2d_editor_plugin.h +++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.h @@ -85,7 +85,7 @@ protected: public: Vector2 snap_point(const Vector2& p_point) const; - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_collision_polygon); LightOccluder2DEditor(EditorNode *p_editor); }; @@ -99,7 +99,7 @@ class LightOccluder2DEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual String get_name() const { return "LightOccluder2D"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp index e43872deec..d5ddd3804b 100644 --- a/tools/editor/plugins/material_editor_plugin.cpp +++ b/tools/editor/plugins/material_editor_plugin.cpp @@ -3,7 +3,7 @@ #if 0 -void MaterialEditor::_input_event(InputEvent p_event) { +void MaterialEditor::_gui_input(InputEvent p_event) { } @@ -93,7 +93,7 @@ void MaterialEditor::_button_pressed(Node* p_button) { void MaterialEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&MaterialEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&MaterialEditor::_gui_input); ClassDB::bind_method(_MD("_button_pressed"),&MaterialEditor::_button_pressed); } diff --git a/tools/editor/plugins/material_editor_plugin.h b/tools/editor/plugins/material_editor_plugin.h index ebdbda9683..556e56e66b 100644 --- a/tools/editor/plugins/material_editor_plugin.h +++ b/tools/editor/plugins/material_editor_plugin.h @@ -39,7 +39,7 @@ class MaterialEditor : public Control { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index 13f3204a05..db96a60808 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -29,7 +29,7 @@ #include "mesh_editor_plugin.h" #if 0 -void MeshEditor::_input_event(InputEvent p_event) { +void MeshEditor::_gui_input(InputEvent p_event) { if (p_event.type==InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask&BUTTON_MASK_LEFT) { @@ -136,7 +136,7 @@ void MeshEditor::_button_pressed(Node* p_button) { void MeshEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&MeshEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&MeshEditor::_gui_input); ClassDB::bind_method(_MD("_button_pressed"),&MeshEditor::_button_pressed); } diff --git a/tools/editor/plugins/mesh_editor_plugin.h b/tools/editor/plugins/mesh_editor_plugin.h index dc1ae98245..136290ffd4 100644 --- a/tools/editor/plugins/mesh_editor_plugin.h +++ b/tools/editor/plugins/mesh_editor_plugin.h @@ -65,7 +65,7 @@ class MeshEditor : public Control { void _update_rotation(); protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp index 2d99522e0e..5f34d23b64 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -116,7 +116,7 @@ void NavigationPolygonEditor::_wip_close() { edited_point=-1; } -bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) { +bool NavigationPolygonEditor::forward_gui_input(const InputEvent& p_event) { if (!node) diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.h b/tools/editor/plugins/navigation_polygon_editor_plugin.h index 1a5fa3c456..d3e56de042 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.h +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.h @@ -87,7 +87,7 @@ protected: static void _bind_methods(); public: - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_collision_polygon); NavigationPolygonEditor(EditorNode *p_editor); }; @@ -101,7 +101,7 @@ class NavigationPolygonEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual String get_name() const { return "NavigationPolygonInstance"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index 85bd751d23..fdd781b178 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -62,7 +62,7 @@ void Path2DEditor::_node_removed(Node *p_node) { } -bool Path2DEditor::forward_input_event(const InputEvent& p_event) { +bool Path2DEditor::forward_gui_input(const InputEvent& p_event) { if (!node) return false; diff --git a/tools/editor/plugins/path_2d_editor_plugin.h b/tools/editor/plugins/path_2d_editor_plugin.h index d17ecd77db..407d07905f 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.h +++ b/tools/editor/plugins/path_2d_editor_plugin.h @@ -94,7 +94,7 @@ protected: static void _bind_methods(); public: - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_path2d); Path2DEditor(EditorNode *p_editor); }; @@ -108,7 +108,7 @@ class Path2DEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return path2d_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return path2d_editor->forward_gui_input(p_event); } virtual String get_name() const { return "Path2D"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp index 4d52549533..a69de2e78d 100644 --- a/tools/editor/plugins/path_editor_plugin.cpp +++ b/tools/editor/plugins/path_editor_plugin.cpp @@ -285,7 +285,7 @@ Ref<SpatialEditorGizmo> PathEditorPlugin::create_spatial_gizmo(Spatial* p_spatia return Ref<SpatialEditorGizmo>(); } -bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { +bool PathEditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) { if (!path) return false; diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h index 14c1bf0df7..e446dfa7c7 100644 --- a/tools/editor/plugins/path_editor_plugin.h +++ b/tools/editor/plugins/path_editor_plugin.h @@ -81,9 +81,9 @@ public: static PathEditorPlugin* singleton; Ref<FixedSpatialMaterial> path_material; Ref<FixedSpatialMaterial> path_thin_material; - virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event); + virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); -// virtual bool forward_input_event(const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); } +// virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial); virtual String get_name() const { return "Path"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index 4977d5facc..88877190e1 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -216,7 +216,7 @@ void Polygon2DEditor::_wip_close() { edited_point=-1; } -bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) { +bool Polygon2DEditor::forward_gui_input(const InputEvent& p_event) { if (node==NULL) return false; @@ -975,7 +975,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) { uv_hscroll->connect("value_changed",this,"_uv_scroll_changed"); uv_edit_draw->connect("draw",this,"_uv_draw"); - uv_edit_draw->connect("input_event",this,"_uv_input"); + uv_edit_draw->connect("gui_input",this,"_uv_input"); uv_draw_zoom=1.0; uv_drag_index=-1; uv_drag=false; diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.h b/tools/editor/plugins/polygon_2d_editor_plugin.h index 67d50f6ac2..c3051ca88d 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.h +++ b/tools/editor/plugins/polygon_2d_editor_plugin.h @@ -137,7 +137,7 @@ protected: public: - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_collision_polygon); Polygon2DEditor(EditorNode *p_editor); }; @@ -151,7 +151,7 @@ class Polygon2DEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual String get_name() const { return "Polygon2D"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp index f664fccbc8..fc6a548595 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -34,7 +34,7 @@ -void ResourcePreloaderEditor::_input_event(InputEvent p_event) { +void ResourcePreloaderEditor::_gui_input(InputEvent p_event) { } @@ -381,7 +381,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2& p_point,const Variant& void ResourcePreloaderEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&ResourcePreloaderEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ResourcePreloaderEditor::_gui_input); ClassDB::bind_method(_MD("_load_pressed"),&ResourcePreloaderEditor::_load_pressed); ClassDB::bind_method(_MD("_item_edited"),&ResourcePreloaderEditor::_item_edited); ClassDB::bind_method(_MD("_delete_pressed"),&ResourcePreloaderEditor::_delete_pressed); diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.h b/tools/editor/plugins/resource_preloader_editor_plugin.h index e7d883d20a..6990301ded 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.h +++ b/tools/editor/plugins/resource_preloader_editor_plugin.h @@ -74,7 +74,7 @@ class ResourcePreloaderEditor : public PanelContainer { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp index e836e04e19..12ec7c8260 100644 --- a/tools/editor/plugins/sample_editor_plugin.cpp +++ b/tools/editor/plugins/sample_editor_plugin.cpp @@ -35,7 +35,7 @@ -void SampleEditor::_input_event(InputEvent p_event) { +void SampleEditor::_gui_input(InputEvent p_event) { } @@ -348,7 +348,7 @@ void SampleEditor::edit(Ref<Sample> p_sample) { void SampleEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&SampleEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&SampleEditor::_gui_input); ClassDB::bind_method(_MD("_play_pressed"),&SampleEditor::_play_pressed); ClassDB::bind_method(_MD("_stop_pressed"),&SampleEditor::_stop_pressed); diff --git a/tools/editor/plugins/sample_editor_plugin.h b/tools/editor/plugins/sample_editor_plugin.h index ad6fffc3ef..59cdb10304 100644 --- a/tools/editor/plugins/sample_editor_plugin.h +++ b/tools/editor/plugins/sample_editor_plugin.h @@ -57,7 +57,7 @@ class SampleEditor : public Panel { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp index 45615ccf9e..a7ccfb6978 100644 --- a/tools/editor/plugins/sample_library_editor_plugin.cpp +++ b/tools/editor/plugins/sample_library_editor_plugin.cpp @@ -35,7 +35,7 @@ #include "sample_editor_plugin.h" -void SampleLibraryEditor::_input_event(InputEvent p_event) { +void SampleLibraryEditor::_gui_input(InputEvent p_event) { } @@ -411,7 +411,7 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da void SampleLibraryEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&SampleLibraryEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&SampleLibraryEditor::_gui_input); ClassDB::bind_method(_MD("_load_pressed"),&SampleLibraryEditor::_load_pressed); ClassDB::bind_method(_MD("_item_edited"),&SampleLibraryEditor::_item_edited); ClassDB::bind_method(_MD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed); diff --git a/tools/editor/plugins/sample_library_editor_plugin.h b/tools/editor/plugins/sample_library_editor_plugin.h index 03bf01a459..1856d338ed 100644 --- a/tools/editor/plugins/sample_library_editor_plugin.h +++ b/tools/editor/plugins/sample_library_editor_plugin.h @@ -74,7 +74,7 @@ class SampleLibraryEditor : public Panel { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index b3d86817c7..6c305530c5 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -183,7 +183,7 @@ void ScriptEditorQuickOpen::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - search_options->call("_input_event",p_ie); + search_options->call("_gui_input",p_ie); search_box->accept_event(); } @@ -258,7 +258,7 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() { search_box = memnew( LineEdit ); vbc->add_margin_child(TTR("Search:"),search_box); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Open")); diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index 3921c05fd1..331e38884b 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -979,7 +979,7 @@ void ScriptTextEditor::_bind_methods() { ClassDB::bind_method("_edit_option",&ScriptTextEditor::_edit_option); ClassDB::bind_method("_goto_line",&ScriptTextEditor::_goto_line); ClassDB::bind_method("_lookup_symbol",&ScriptTextEditor::_lookup_symbol); - ClassDB::bind_method("_text_edit_input_event", &ScriptTextEditor::_text_edit_input_event); + ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input); ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed); @@ -1159,7 +1159,7 @@ void ScriptTextEditor::drop_data_fw(const Point2& p_point,const Variant& p_data, } -void ScriptTextEditor::_text_edit_input_event(const InputEvent& ev) { +void ScriptTextEditor::_text_edit_gui_input(const InputEvent& ev) { if (ev.type == InputEvent::MOUSE_BUTTON) { InputEventMouseButton mb = ev.mouse_button; if (mb.button_index == BUTTON_RIGHT && !mb.pressed) { @@ -1269,7 +1269,7 @@ ScriptTextEditor::ScriptTextEditor() { code_editor->get_text_edit()->set_select_identifiers_on_hover(true); code_editor->get_text_edit()->set_context_menu_enabled(false); - code_editor->get_text_edit()->connect("input_event", this, "_text_edit_input_event"); + code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input"); context_menu = memnew(PopupMenu); add_child(context_menu); diff --git a/tools/editor/plugins/script_text_editor.h b/tools/editor/plugins/script_text_editor.h index 064e8552b8..215d0626f0 100644 --- a/tools/editor/plugins/script_text_editor.h +++ b/tools/editor/plugins/script_text_editor.h @@ -105,7 +105,7 @@ protected: void _edit_option(int p_op); void _make_context_menu(bool p_selection, bool p_color); - void _text_edit_input_event(const InputEvent& ev); + void _text_edit_gui_input(const InputEvent& ev); void _color_changed(const Color& p_color); void _goto_line(int p_line) { goto_line(p_line); } diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index 1f319a97cc..90aa0edf30 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -37,7 +37,7 @@ #include "os/keyboard.h" #include "canvas_item_editor_plugin.h" -void GraphColorRampEdit::_input_event(const InputEvent& p_event) { +void GraphColorRampEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) { @@ -296,7 +296,7 @@ Vector<Color> GraphColorRampEdit::get_colors() const{ void GraphColorRampEdit::_bind_methods(){ - ClassDB::bind_method(_MD("_input_event"),&GraphColorRampEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&GraphColorRampEdit::_gui_input); ClassDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed); ADD_SIGNAL(MethodInfo("ramp_changed")); } @@ -316,7 +316,7 @@ GraphColorRampEdit::GraphColorRampEdit(){ } //////////// -void GraphCurveMapEdit::_input_event(const InputEvent& p_event) { +void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) { @@ -658,7 +658,7 @@ Vector<Vector2> GraphCurveMapEdit::get_points() const { void GraphCurveMapEdit::_bind_methods(){ - ClassDB::bind_method(_MD("_input_event"),&GraphCurveMapEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&GraphCurveMapEdit::_gui_input); ADD_SIGNAL(MethodInfo("curve_changed")); } diff --git a/tools/editor/plugins/shader_graph_editor_plugin.h b/tools/editor/plugins/shader_graph_editor_plugin.h index c9887718f8..477a45bd1f 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.h +++ b/tools/editor/plugins/shader_graph_editor_plugin.h @@ -70,7 +70,7 @@ class GraphColorRampEdit : public Control { void _color_changed(const Color& p_color); protected: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); static void _bind_methods(); public: @@ -104,7 +104,7 @@ class GraphCurveMapEdit : public Control { void _plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d); protected: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); static void _bind_methods(); public: diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 7913d097b7..d74966f1b9 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -824,7 +824,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); if (!over_plugin_list->empty()) { - bool discard = over_plugin_list->forward_spatial_input_event(camera,p_event); + bool discard = over_plugin_list->forward_spatial_gui_input(camera,p_event); if (discard) return; } @@ -1852,7 +1852,7 @@ void SpatialEditorViewport::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { surface->connect("draw",this,"_draw"); - surface->connect("input_event",this,"_sinput"); + surface->connect("gui_input",this,"_sinput"); surface->connect("mouse_enter",this,"_smouseenter"); preview_camera->set_icon(get_icon("Camera","EditorIcons")); _init_gizmo_instance(index); @@ -3505,7 +3505,7 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) { EditorNode *en = editor; EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); - if (!over_plugin_list->empty() && over_plugin_list->forward_input_event(p_event)) { + if (!over_plugin_list->empty() && over_plugin_list->forward_gui_input(p_event)) { return; //ate the over input event } @@ -3702,7 +3702,7 @@ void SpatialEditor::_node_removed(Node* p_node) { void SpatialEditor::_bind_methods() { -// ClassDB::bind_method("_input_event",&SpatialEditor::_input_event); +// ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input); ClassDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input); ClassDB::bind_method("_node_removed",&SpatialEditor::_node_removed); ClassDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed); @@ -4007,7 +4007,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_light_base = memnew( ViewportContainer ); settings_light_base->set_custom_minimum_size(Size2(128,128)); - settings_light_base->connect("input_event",this,"_default_light_angle_input"); + settings_light_base->connect("gui_input",this,"_default_light_angle_input"); settings_vbc->add_margin_child(TTR("Default Light Normal:"),settings_light_base); settings_light_vp = memnew( Viewport ); settings_light_vp->set_disable_input(true); diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h index f177dcab45..e09a29d4f8 100644 --- a/tools/editor/plugins/spatial_editor_plugin.h +++ b/tools/editor/plugins/spatial_editor_plugin.h @@ -481,7 +481,7 @@ protected: void _notification(int p_what); - //void _input_event(InputEvent p_event); + //void _gui_input(InputEvent p_event); void _unhandled_key_input(InputEvent p_event); static void _bind_methods(); diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp index fbdbb37b54..67948b0302 100644 --- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp @@ -35,7 +35,7 @@ -void SpriteFramesEditor::_input_event(InputEvent p_event) { +void SpriteFramesEditor::_gui_input(InputEvent p_event) { } @@ -754,7 +754,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat void SpriteFramesEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&SpriteFramesEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&SpriteFramesEditor::_gui_input); ClassDB::bind_method(_MD("_load_pressed"),&SpriteFramesEditor::_load_pressed); ClassDB::bind_method(_MD("_empty_pressed"),&SpriteFramesEditor::_empty_pressed); ClassDB::bind_method(_MD("_empty2_pressed"),&SpriteFramesEditor::_empty2_pressed); diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.h b/tools/editor/plugins/sprite_frames_editor_plugin.h index 383b831a23..36a022b7e4 100644 --- a/tools/editor/plugins/sprite_frames_editor_plugin.h +++ b/tools/editor/plugins/sprite_frames_editor_plugin.h @@ -104,7 +104,7 @@ class SpriteFramesEditor : public PanelContainer { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/texture_editor_plugin.cpp b/tools/editor/plugins/texture_editor_plugin.cpp index c8cf3d9701..7ff7d0f2f7 100644 --- a/tools/editor/plugins/texture_editor_plugin.cpp +++ b/tools/editor/plugins/texture_editor_plugin.cpp @@ -4,7 +4,7 @@ #include "globals.h" #include "tools/editor/editor_settings.h" -void TextureEditor::_input_event(InputEvent p_event) { +void TextureEditor::_gui_input(InputEvent p_event) { } @@ -84,7 +84,7 @@ void TextureEditor::edit(Ref<Texture> p_texture) { void TextureEditor::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&TextureEditor::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&TextureEditor::_gui_input); } diff --git a/tools/editor/plugins/texture_editor_plugin.h b/tools/editor/plugins/texture_editor_plugin.h index 5695e18f4f..4b05f7f7ab 100644 --- a/tools/editor/plugins/texture_editor_plugin.h +++ b/tools/editor/plugins/texture_editor_plugin.h @@ -17,7 +17,7 @@ class TextureEditor : public Control { protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); static void _bind_methods(); public: diff --git a/tools/editor/plugins/texture_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp index 4a25e636aa..8b3de86d47 100644 --- a/tools/editor/plugins/texture_region_editor_plugin.cpp +++ b/tools/editor/plugins/texture_region_editor_plugin.cpp @@ -921,7 +921,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor) hscroll->connect("value_changed",this,"_scroll_changed"); edit_draw->connect("draw",this,"_region_draw"); - edit_draw->connect("input_event",this,"_region_input"); + edit_draw->connect("gui_input",this,"_region_input"); draw_zoom=1.0; updating_scroll=false; diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 3dd86527b0..05a352964f 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -189,7 +189,7 @@ void TileMapEditor::_sbox_input(const InputEvent& p_ie) { p_ie.key.scancode == KEY_PAGEUP || p_ie.key.scancode == KEY_PAGEDOWN ) ) { - palette->call("_input_event", p_ie); + palette->call("_gui_input", p_ie); search_box->accept_event(); } } @@ -595,7 +595,7 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) { return points; } -bool TileMapEditor::forward_input_event(const InputEvent& p_event) { +bool TileMapEditor::forward_gui_input(const InputEvent& p_event) { if (!node || !node->get_tileset().is_valid() || !node->is_visible()) return false; @@ -1441,7 +1441,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { search_box->set_h_size_flags(SIZE_EXPAND_FILL); search_box->connect("text_entered", this, "_text_entered"); search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("input_event", this, "_sbox_input"); + search_box->connect("gui_input", this, "_sbox_input"); add_child(search_box); size_slider = memnew( HSlider ); diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h index 5217453740..79c2dcd0bd 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.h +++ b/tools/editor/plugins/tile_map_editor_plugin.h @@ -175,7 +175,7 @@ public: HBoxContainer *get_toolbar() const { return toolbar; } - bool forward_input_event(const InputEvent& p_event); + bool forward_gui_input(const InputEvent& p_event); void edit(Node *p_tile_map); TileMapEditor(EditorNode *p_editor); @@ -190,7 +190,7 @@ class TileMapEditorPlugin : public EditorPlugin { public: - virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return tile_map_editor->forward_input_event(p_event); } + virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return tile_map_editor->forward_gui_input(p_event); } virtual String get_name() const { return "TileMap"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 2af95516fa..6ef4580dac 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -856,7 +856,7 @@ void ProjectManager::_load_recent_projects() { hb->set_meta("main_scene",main_scene); hb->set_meta("favorite",is_favorite); hb->connect("draw",this,"_panel_draw",varray(hb)); - hb->connect("input_event",this,"_panel_input",varray(hb)); + hb->connect("gui_input",this,"_panel_input",varray(hb)); hb->add_constant_override("separation",10*EDSCALE); VBoxContainer *favorite_box = memnew( VBoxContainer ); diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 0f267f2fbb..f16f20fb96 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -1413,7 +1413,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { l->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,30); press_a_key_label=l; press_a_key->add_child(l); - press_a_key->connect("input_event",this,"_wait_for_key"); + press_a_key->connect("gui_input",this,"_wait_for_key"); press_a_key->connect("confirmed",this,"_press_a_key_confirm"); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 294a71aa50..ecae00a63e 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2033,7 +2033,7 @@ CustomPropertyEditor::CustomPropertyEditor() { add_child(easing_draw); easing_draw->hide(); easing_draw->connect("draw",this,"_draw_easing"); - easing_draw->connect("input_event",this,"_drag_easing"); + easing_draw->connect("gui_input",this,"_drag_easing"); //easing_draw->emit_signal(SceneStringNames::get_singleton()->input_event,InputEvent()); easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE); diff --git a/tools/editor/property_selector.cpp b/tools/editor/property_selector.cpp index a5b3b9324d..c3e512e990 100644 --- a/tools/editor/property_selector.cpp +++ b/tools/editor/property_selector.cpp @@ -18,7 +18,7 @@ void PropertySelector::_sbox_input(const InputEvent& p_ie) { case KEY_PAGEUP: case KEY_PAGEDOWN: { - search_options->call("_input_event", p_ie); + search_options->call("_gui_input", p_ie); search_box->accept_event(); TreeItem *root = search_options->get_root(); @@ -578,7 +578,7 @@ PropertySelector::PropertySelector() { search_box = memnew( LineEdit ); vbc->add_margin_child(TTR("Search:"),search_box); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Open")); diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp index f129a365ce..f1746efd69 100644 --- a/tools/editor/quick_open.cpp +++ b/tools/editor/quick_open.cpp @@ -86,7 +86,7 @@ void EditorQuickOpen::_sbox_input(const InputEvent& p_ie) { case KEY_PAGEUP: case KEY_PAGEDOWN: { - search_options->call("_input_event", p_ie); + search_options->call("_gui_input", p_ie); search_box->accept_event(); TreeItem *root = search_options->get_root(); @@ -270,7 +270,7 @@ EditorQuickOpen::EditorQuickOpen() { search_box = memnew( LineEdit ); vbc->add_margin_child(TTR("Search:"),search_box); search_box->connect("text_changed",this,"_text_changed"); - search_box->connect("input_event",this,"_sbox_input"); + search_box->connect("gui_input",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child(TTR("Matches:"),search_options,true); get_ok()->set_text(TTR("Open")); diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp index 112dee291f..70bef1abcb 100644 --- a/tools/editor/settings_config_dialog.cpp +++ b/tools/editor/settings_config_dialog.cpp @@ -380,7 +380,7 @@ EditorSettingsDialog::EditorSettingsDialog() { l->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,30); press_a_key_label=l; press_a_key->add_child(l); - press_a_key->connect("input_event",this,"_wait_for_key"); + press_a_key->connect("gui_input",this,"_wait_for_key"); press_a_key->connect("confirmed",this,"_press_a_key_confirm"); //Button *load = memnew( Button ); |