diff options
Diffstat (limited to 'scene/gui')
45 files changed, 84 insertions, 84 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 646bc70585..1f5296e9d2 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -33,7 +33,7 @@ #include "scene/scene_string_names.h" #include "scene/main/viewport.h" -void BaseButton::_input_event(InputEvent p_event) { +void BaseButton::_gui_input(InputEvent p_event) { if (status.disabled) // no interaction with disabled button @@ -464,7 +464,7 @@ String BaseButton::get_tooltip(const Point2& p_pos) const { void BaseButton::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&BaseButton::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&BaseButton::_gui_input); ClassDB::bind_method(_MD("_unhandled_input"),&BaseButton::_unhandled_input); ClassDB::bind_method(_MD("set_pressed","pressed"),&BaseButton::set_pressed); ClassDB::bind_method(_MD("is_pressed"),&BaseButton::is_pressed); diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index 6fbf11dedd..ed39b34aa8 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -70,7 +70,7 @@ protected: virtual void pressed(); virtual void toggled(bool p_pressed); static void _bind_methods(); - virtual void _input_event(InputEvent p_event); + virtual void _gui_input(InputEvent p_event); virtual void _unhandled_input(InputEvent p_event); void _notification(int p_what); diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp index d6b2c12a3a..3d7c0e2825 100644 --- a/scene/gui/button_array.cpp +++ b/scene/gui/button_array.cpp @@ -300,7 +300,7 @@ void ButtonArray::_notification(int p_what) { } -void ButtonArray::_input_event(const InputEvent& p_event) { +void ButtonArray::_gui_input(const InputEvent& p_event) { if ( ( (orientation==HORIZONTAL && p_event.is_action("ui_left") ) || @@ -544,7 +544,7 @@ void ButtonArray::_bind_methods() { ClassDB::bind_method(_MD("erase_button","button_idx"),&ButtonArray::erase_button); ClassDB::bind_method(_MD("clear"),&ButtonArray::clear); - ClassDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ButtonArray::_gui_input); BIND_CONSTANT( ALIGN_BEGIN ); BIND_CONSTANT( ALIGN_CENTER ); diff --git a/scene/gui/button_array.h b/scene/gui/button_array.h index 6df0f3b6a4..37533695c9 100644 --- a/scene/gui/button_array.h +++ b/scene/gui/button_array.h @@ -74,7 +74,7 @@ protected: public: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void set_align(Align p_align); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 10f4ae9fec..9083bdc128 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -442,7 +442,7 @@ void ColorPicker::_screen_pick_pressed() r->add_child(screen); screen->set_as_toplevel(true); screen->set_area_as_parent_rect(); - screen->connect("input_event",this,"_screen_input"); + screen->connect("gui_input",this,"_screen_input"); } screen->raise(); screen->show_modal(); @@ -502,7 +502,7 @@ ColorPicker::ColorPicker() : uv_edit->set_ignore_mouse(false); - uv_edit->connect("input_event", this, "_uv_input"); + uv_edit->connect("gui_input", this, "_uv_input"); uv_edit->set_stop_mouse(false); uv_edit->set_custom_minimum_size(Size2 (256,256)); Vector<Variant> args=Vector<Variant>(); @@ -515,7 +515,7 @@ ColorPicker::ColorPicker() : w_edit= memnew( Control ); w_edit->set_ignore_mouse(false); w_edit->set_custom_minimum_size(Size2(30,256)); - w_edit->connect("input_event", this, "_w_input"); + w_edit->connect("gui_input", this, "_w_input"); args.clear(); args.push_back(1); args.push_back(w_edit); @@ -593,7 +593,7 @@ ColorPicker::ColorPicker() : preset = memnew( TextureFrame ); bbc->add_child(preset); preset->set_ignore_mouse(false); - preset->connect("input_event", this, "_preset_input"); + preset->connect("gui_input", this, "_preset_input"); bt_add_preset = memnew ( Button ); bt_add_preset->set_icon(get_icon("add_preset")); diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index 195acebdfd..5b474ebc25 100644 --- a/scene/gui/color_ramp_edit.cpp +++ b/scene/gui/color_ramp_edit.cpp @@ -70,7 +70,7 @@ ColorRampEdit::~ColorRampEdit() { } -void ColorRampEdit::_input_event(const InputEvent& p_event) { +void ColorRampEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) { @@ -446,7 +446,7 @@ Vector<ColorRamp::Point>& ColorRampEdit::get_points() { } void ColorRampEdit::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&ColorRampEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ColorRampEdit::_gui_input); ClassDB::bind_method(_MD("_color_changed"),&ColorRampEdit::_color_changed); ADD_SIGNAL(MethodInfo("ramp_changed")); } diff --git a/scene/gui/color_ramp_edit.h b/scene/gui/color_ramp_edit.h index c67a75e152..c6a20a539d 100644 --- a/scene/gui/color_ramp_edit.h +++ b/scene/gui/color_ramp_edit.h @@ -55,7 +55,7 @@ class ColorRampEdit : public Control { void _show_color_picker(); protected: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); static void _bind_methods(); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6589dfcef0..abfe11dba0 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2558,7 +2558,7 @@ void Control::_bind_methods() { ClassDB::bind_method(_MD("_font_changed"), &Control::_font_changed); - BIND_VMETHOD(MethodInfo("_input_event",PropertyInfo(Variant::INPUT_EVENT,"event"))); + BIND_VMETHOD(MethodInfo("_gui_input",PropertyInfo(Variant::INPUT_EVENT,"event"))); BIND_VMETHOD(MethodInfo(Variant::VECTOR2,"get_minimum_size")); BIND_VMETHOD(MethodInfo(Variant::OBJECT,"get_drag_data",PropertyInfo(Variant::VECTOR2,"pos"))); BIND_VMETHOD(MethodInfo(Variant::BOOL,"can_drop_data",PropertyInfo(Variant::VECTOR2,"pos"),PropertyInfo(Variant::NIL,"data"))); @@ -2636,7 +2636,7 @@ void Control::_bind_methods() { BIND_CONSTANT( SIZE_EXPAND_FILL ); ADD_SIGNAL( MethodInfo("resized") ); - ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::INPUT_EVENT,"ev")) ); + ADD_SIGNAL( MethodInfo("gui_input",PropertyInfo(Variant::INPUT_EVENT,"ev")) ); ADD_SIGNAL( MethodInfo("mouse_enter") ); ADD_SIGNAL( MethodInfo("mouse_exit") ); ADD_SIGNAL( MethodInfo("focus_enter") ); diff --git a/scene/gui/control.h b/scene/gui/control.h index e19523a05b..7295c393a5 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -208,7 +208,7 @@ protected: virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); - //virtual void _window_input_event(InputEvent p_event); + //virtual void _window_gui_input(InputEvent p_event); bool _set(const StringName& p_name, const Variant& p_value); bool _get(const StringName& p_name,Variant &r_ret) const; diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 5bc52a0c4c..9e8a3f7bd6 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -47,7 +47,7 @@ bool WindowDialog::has_point(const Point2& p_point) const { } -void WindowDialog::_input_event(const InputEvent& p_event) { +void WindowDialog::_gui_input(const InputEvent& p_event) { if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT) { @@ -141,7 +141,7 @@ TextureButton *WindowDialog::get_close_button() { void WindowDialog::_bind_methods() { - ClassDB::bind_method( _MD("_input_event"),&WindowDialog::_input_event); + ClassDB::bind_method( _MD("_gui_input"),&WindowDialog::_gui_input); ClassDB::bind_method( _MD("set_title","title"),&WindowDialog::set_title); ClassDB::bind_method( _MD("get_title"),&WindowDialog::get_title); ClassDB::bind_method( _MD("_closed"),&WindowDialog::_closed); diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index 30a69634f3..b76ab8299c 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -48,7 +48,7 @@ class WindowDialog : public Popup { String title; bool dragging; - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _closed(); protected: virtual void _post_popup(); diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 7513480cbe..25260ec608 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -793,7 +793,7 @@ void GraphEdit::set_selected(Node* p_child) { } } -void GraphEdit::_input_event(const InputEvent& p_ev) { +void GraphEdit::_gui_input(const InputEvent& p_ev) { if (p_ev.type==InputEvent::MOUSE_MOTION && (p_ev.mouse_motion.button_mask&BUTTON_MASK_MIDDLE || (p_ev.mouse_motion.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE)))) { h_scroll->set_value( h_scroll->get_value() - p_ev.mouse_motion.relative_x ); @@ -1233,7 +1233,7 @@ void GraphEdit::_bind_methods() { ClassDB::bind_method(_MD("_snap_toggled"),&GraphEdit::_snap_toggled); ClassDB::bind_method(_MD("_snap_value_changed"),&GraphEdit::_snap_value_changed); - ClassDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&GraphEdit::_gui_input); ClassDB::bind_method(_MD("_update_scroll_offset"),&GraphEdit::_update_scroll_offset); ClassDB::bind_method(_MD("_connections_layer_draw"),&GraphEdit::_connections_layer_draw); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 9b2774590f..86b976c4fe 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -123,7 +123,7 @@ private: void _update_scroll(); void _scroll_moved(double); - void _input_event(const InputEvent& p_ev); + void _gui_input(const InputEvent& p_ev); Control *connections_layer; GraphEditFilter *top_layer; diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index e0f786e755..4d658deab4 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -621,7 +621,7 @@ Color GraphNode::get_connection_output_color(int p_idx) { return conn_output_cache[p_idx].color; } -void GraphNode::_input_event(const InputEvent& p_ev) { +void GraphNode::_gui_input(const InputEvent& p_ev) { if (p_ev.type==InputEvent::MOUSE_BUTTON) { @@ -724,7 +724,7 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(_MD("set_title","title"),&GraphNode::set_title); ClassDB::bind_method(_MD("get_title"),&GraphNode::get_title); - ClassDB::bind_method(_MD("_input_event"),&GraphNode::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&GraphNode::_gui_input); ClassDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right","custom_left","custom_right"),&GraphNode::set_slot,DEFVAL(Ref<Texture>()),DEFVAL(Ref<Texture>())); ClassDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot); diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 5d90a006e6..a128426d38 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -99,7 +99,7 @@ private: protected: - void _input_event(const InputEvent& p_ev); + void _gui_input(const InputEvent& p_ev); void _notification(int p_what); static void _bind_methods(); diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index d16a647fca..5a9b1173da 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -446,7 +446,7 @@ Size2 ItemList::Item::get_icon_size() const { return icon_region.size; } -void ItemList::_input_event(const InputEvent& p_event) { +void ItemList::_gui_input(const InputEvent& p_event) { if (defer_select_single>=0 && p_event.type==InputEvent::MOUSE_MOTION) { defer_select_single=-1; @@ -1361,7 +1361,7 @@ void ItemList::_bind_methods(){ ClassDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll); ClassDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed); - ClassDB::bind_method(_MD("_input_event"),&ItemList::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ItemList::_gui_input); BIND_CONSTANT( ICON_MODE_TOP ); BIND_CONSTANT( ICON_MODE_LEFT ); diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h index d3db209ceb..f4a864c782 100644 --- a/scene/gui/item_list.h +++ b/scene/gui/item_list.h @@ -102,7 +102,7 @@ private: real_t icon_scale; void _scroll_changed(double); - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); protected: diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 6537791faf..d5214a0c1a 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -41,7 +41,7 @@ static bool _is_text_char(CharType c) { return (c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') || c=='_'; } -void LineEdit::_input_event(InputEvent p_event) { +void LineEdit::_gui_input(InputEvent p_event) { switch(p_event.type) { @@ -1267,7 +1267,7 @@ void LineEdit::_bind_methods() { ClassDB::bind_method(_MD("set_align", "align"), &LineEdit::set_align); ClassDB::bind_method(_MD("get_align"), &LineEdit::get_align); - ClassDB::bind_method(_MD("_input_event"),&LineEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&LineEdit::_gui_input); ClassDB::bind_method(_MD("clear"),&LineEdit::clear); ClassDB::bind_method(_MD("select_all"),&LineEdit::select_all); ClassDB::bind_method(_MD("set_text","text"),&LineEdit::set_text); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index 46ca472d6f..64c37861d0 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -119,7 +119,7 @@ private: void _editor_settings_changed(); #endif - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); void _notification(int p_what); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 372e4657e1..a96a39083c 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -62,7 +62,7 @@ void MenuButton::pressed() { } -void MenuButton::_input_event(InputEvent p_event) { +void MenuButton::_gui_input(InputEvent p_event) { /*if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT) { clicked=p_event.mouse_button.pressed; @@ -79,7 +79,7 @@ void MenuButton::_input_event(InputEvent p_event) { }*/ - BaseButton::_input_event(p_event); + BaseButton::_gui_input(p_event); } PopupMenu *MenuButton::get_popup() { diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h index 274f494fb5..5b5573456f 100644 --- a/scene/gui/menu_button.h +++ b/scene/gui/menu_button.h @@ -46,7 +46,7 @@ class MenuButton : public Button { Array _get_items() const; void _set_items(const Array& p_items); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); protected: diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 49c63f91b4..5126568e5f 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -31,7 +31,7 @@ -void Popup::_input_event(InputEvent p_event) { +void Popup::_gui_input(InputEvent p_event) { } diff --git a/scene/gui/popup.h b/scene/gui/popup.h index c9b5511630..17ae4a938a 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -45,7 +45,7 @@ protected: virtual void _post_popup() {} - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); void _notification(int p_what); void _fix_size(); static void _bind_methods(); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e4a03f6e2b..c28c1cc61c 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -215,7 +215,7 @@ void PopupMenu::_submenu_timeout() { } -void PopupMenu::_input_event(const InputEvent &p_event) { +void PopupMenu::_gui_input(const InputEvent &p_event) { switch( p_event.type) { @@ -308,7 +308,7 @@ void PopupMenu::_input_event(const InputEvent &p_event) { ie.type=InputEvent::MOUSE_MOTION; ie.mouse_motion.x=b.x; ie.mouse_motion.y=b.y+s; - _input_event(ie); + _gui_input(ie); } } break; case BUTTON_WHEEL_UP: { @@ -328,7 +328,7 @@ void PopupMenu::_input_event(const InputEvent &p_event) { ie.type=InputEvent::MOUSE_MOTION; ie.mouse_motion.x=b.x; ie.mouse_motion.y=b.y-s; - _input_event(ie); + _gui_input(ie); } @@ -1098,7 +1098,7 @@ void PopupMenu::clear_autohide_areas(){ void PopupMenu::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&PopupMenu::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&PopupMenu::_gui_input); ClassDB::bind_method(_MD("add_icon_item","texture","label","id","accel"),&PopupMenu::add_icon_item,DEFVAL(-1),DEFVAL(0)); ClassDB::bind_method(_MD("add_item","label","id","accel"),&PopupMenu::add_item,DEFVAL(-1),DEFVAL(0)); ClassDB::bind_method(_MD("add_icon_check_item","texture","label","id","accel"),&PopupMenu::add_icon_check_item,DEFVAL(-1),DEFVAL(0)); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 9cc3daa8fe..be12a5fc3c 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -71,7 +71,7 @@ class PopupMenu : public Popup { String _get_accel_text(int p_item) const; int _get_mouse_over(const Point2& p_over) const; virtual Size2 get_minimum_size() const; - void _input_event(const InputEvent &p_event); + void _gui_input(const InputEvent &p_event); void _activate_submenu(int over); void _submenu_timeout(); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index b71ed48c13..2e68b19f78 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -789,7 +789,7 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2& p_pos) const } -void RichTextLabel::_input_event(InputEvent p_event) { +void RichTextLabel::_gui_input(InputEvent p_event) { switch(p_event.type) { @@ -1902,7 +1902,7 @@ String RichTextLabel::get_text() { void RichTextLabel::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&RichTextLabel::_gui_input); ClassDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed); ClassDB::bind_method(_MD("get_text"),&RichTextLabel::get_text); ClassDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text); diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 829103dea2..39032185f8 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -267,7 +267,7 @@ private: void _update_scroll(); void _scroll_changed(double); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); Item *_get_next_item(Item* p_item, bool p_free=false); bool use_bbcode; diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 908f360290..0b32ca4952 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -39,7 +39,7 @@ void ScrollBar::set_can_focus_by_default(bool p_can_focus) { focus_by_default=p_can_focus; } -void ScrollBar::_input_event(InputEvent p_event) { +void ScrollBar::_gui_input(InputEvent p_event) { switch(p_event.type) { @@ -302,7 +302,7 @@ void ScrollBar::_notification(int p_what) { } if (drag_slave) { - drag_slave->connect("input_event",this,"_drag_slave_input"); + drag_slave->connect("gui_input",this,"_drag_slave_input"); drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT); } @@ -311,7 +311,7 @@ void ScrollBar::_notification(int p_what) { if (p_what==NOTIFICATION_EXIT_TREE) { if (drag_slave) { - drag_slave->disconnect("input_event",this,"_drag_slave_input"); + drag_slave->disconnect("gui_input",this,"_drag_slave_input"); drag_slave->disconnect("exit_tree",this,"_drag_slave_exit"); } @@ -546,7 +546,7 @@ float ScrollBar::get_custom_step() const { void ScrollBar::_drag_slave_exit() { if (drag_slave) { - drag_slave->disconnect("input_event",this,"_drag_slave_input"); + drag_slave->disconnect("gui_input",this,"_drag_slave_input"); } drag_slave=NULL; } @@ -638,7 +638,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) { if (is_inside_tree()) { if (drag_slave) { - drag_slave->disconnect("input_event",this,"_drag_slave_input"); + drag_slave->disconnect("gui_input",this,"_drag_slave_input"); drag_slave->disconnect("exit_tree",this,"_drag_slave_exit"); } } @@ -654,7 +654,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) { } if (drag_slave) { - drag_slave->connect("input_event",this,"_drag_slave_input"); + drag_slave->connect("gui_input",this,"_drag_slave_input"); drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT); } } @@ -804,7 +804,7 @@ bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b.pr void ScrollBar::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&ScrollBar::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ScrollBar::_gui_input); ClassDB::bind_method(_MD("set_custom_step","step"),&ScrollBar::set_custom_step); ClassDB::bind_method(_MD("get_custom_step"),&ScrollBar::get_custom_step); ClassDB::bind_method(_MD("_drag_slave_input"),&ScrollBar::_drag_slave_input); diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h index 97259a07cb..be8b394957 100644 --- a/scene/gui/scroll_bar.h +++ b/scene/gui/scroll_bar.h @@ -87,7 +87,7 @@ class ScrollBar : public Range { void _drag_slave_exit(); void _drag_slave_input(const InputEvent& p_input); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); protected: void _notification(int p_what); diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index bef5746a63..966bad7604 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -79,14 +79,14 @@ void ScrollContainer::_cancel_drag() { drag_from=Vector2(); } -void ScrollContainer::_input_event(const InputEvent& p_input_event) { +void ScrollContainer::_gui_input(const InputEvent& p_gui_input) { - switch(p_input_event.type) { + switch(p_gui_input.type) { case InputEvent::MOUSE_BUTTON: { - const InputEventMouseButton &mb=p_input_event.mouse_button; + const InputEventMouseButton &mb=p_gui_input.mouse_button; if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) { if (h_scroll->is_visible() && !v_scroll->is_visible()){ @@ -158,7 +158,7 @@ void ScrollContainer::_input_event(const InputEvent& p_input_event) { } break; case InputEvent::MOUSE_MOTION: { - const InputEventMouseMotion &mm=p_input_event.mouse_motion; + const InputEventMouseMotion &mm=p_gui_input.mouse_motion; if (drag_touching && ! drag_touching_deaccel) { @@ -438,7 +438,7 @@ void ScrollContainer::set_h_scroll(int p_pos) { void ScrollContainer::_bind_methods() { ClassDB::bind_method(_MD("_scroll_moved"),&ScrollContainer::_scroll_moved); - ClassDB::bind_method(_MD("_input_event"),&ScrollContainer::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&ScrollContainer::_gui_input); ClassDB::bind_method(_MD("set_enable_h_scroll","enable"),&ScrollContainer::set_enable_h_scroll); ClassDB::bind_method(_MD("is_h_scroll_enabled"),&ScrollContainer::is_h_scroll_enabled); ClassDB::bind_method(_MD("set_enable_v_scroll","enable"),&ScrollContainer::set_enable_v_scroll); diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h index 4d783e8f77..69d842a662 100644 --- a/scene/gui/scroll_container.h +++ b/scene/gui/scroll_container.h @@ -64,7 +64,7 @@ protected: Size2 get_minimum_size() const; - void _input_event(const InputEvent& p_input_event); + void _gui_input(const InputEvent& p_gui_input); void _notification(int p_what); void _scroll_moved(float); diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index 8e05f1402e..dacfc644ee 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -37,7 +37,7 @@ Size2 Slider::get_minimum_size() const { return ms; } -void Slider::_input_event(InputEvent p_event) { +void Slider::_gui_input(InputEvent p_event) { @@ -231,7 +231,7 @@ void Slider::set_ticks_on_borders(bool _tob){ void Slider::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&Slider::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&Slider::_gui_input); ClassDB::bind_method(_MD("set_ticks","count"),&Slider::set_ticks); ClassDB::bind_method(_MD("get_ticks"),&Slider::get_ticks); diff --git a/scene/gui/slider.h b/scene/gui/slider.h index 5d68de1b4b..89eb32737b 100644 --- a/scene/gui/slider.h +++ b/scene/gui/slider.h @@ -49,7 +49,7 @@ class Slider : public Range { protected: - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); void _notification(int p_what); static void _bind_methods(); bool ticks_on_borders; diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index efb55b79b6..772d753da9 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -90,7 +90,7 @@ void SpinBox::_range_click_timeout() { } -void SpinBox::_input_event(const InputEvent& p_event) { +void SpinBox::_gui_input(const InputEvent& p_event) { if (!is_editable()) { return; @@ -252,7 +252,7 @@ bool SpinBox::is_editable() const { void SpinBox::_bind_methods() { //ClassDB::bind_method(_MD("_value_changed"),&SpinBox::_value_changed); - ClassDB::bind_method(_MD("_input_event"),&SpinBox::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&SpinBox::_gui_input); ClassDB::bind_method(_MD("_text_entered"),&SpinBox::_text_entered); ClassDB::bind_method(_MD("set_suffix","suffix"),&SpinBox::set_suffix); ClassDB::bind_method(_MD("get_suffix"),&SpinBox::get_suffix); @@ -283,7 +283,7 @@ SpinBox::SpinBox() { //connect("value_changed",this,"_value_changed"); line_edit->connect("text_entered",this,"_text_entered",Vector<Variant>(),CONNECT_DEFERRED); line_edit->connect("focus_exit",this,"_line_edit_focus_exit",Vector<Variant>(),CONNECT_DEFERRED); - line_edit->connect("input_event",this,"_line_edit_input"); + line_edit->connect("gui_input",this,"_line_edit_input"); drag.enabled=false; range_click_timer = memnew( Timer ); diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index e56ff0cd6f..9974ec47bc 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -64,7 +64,7 @@ class SpinBox : public Range { protected: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 609587bcd3..aae3b3fffa 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -299,7 +299,7 @@ void SplitContainer::_notification(int p_what) { } } -void SplitContainer::_input_event(const InputEvent& p_event) { +void SplitContainer::_gui_input(const InputEvent& p_event) { if (collapsed || !_getch(0) || !_getch(1) || dragger_visibility!=DRAGGER_VISIBLE) return; @@ -422,7 +422,7 @@ bool SplitContainer::is_collapsed() const { void SplitContainer::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&SplitContainer::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&SplitContainer::_gui_input); ClassDB::bind_method(_MD("set_split_offset","offset"),&SplitContainer::set_split_offset); ClassDB::bind_method(_MD("get_split_offset"),&SplitContainer::get_split_offset); diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h index b9c77db253..03b6b1a167 100644 --- a/scene/gui/split_container.h +++ b/scene/gui/split_container.h @@ -59,7 +59,7 @@ private: 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/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index d47a4f7ae6..11045eaafd 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -65,7 +65,7 @@ int TabContainer::_get_top_margin() const { -void TabContainer::_input_event(const InputEvent& p_event) { +void TabContainer::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && @@ -714,7 +714,7 @@ Popup* TabContainer::get_popup() const { void TabContainer::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&TabContainer::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&TabContainer::_gui_input); ClassDB::bind_method(_MD("get_tab_count"),&TabContainer::get_tab_count); ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&TabContainer::set_current_tab); ClassDB::bind_method(_MD("get_current_tab"),&TabContainer::get_current_tab); diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index 6885a0f569..8b6ca7704e 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -61,7 +61,7 @@ private: protected: void _child_renamed_callback(); - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 2518672705..98d3f6230d 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -76,7 +76,7 @@ Size2 Tabs::get_minimum_size() const { } -void Tabs::_input_event(const InputEvent& p_event) { +void Tabs::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_MOTION) { @@ -649,7 +649,7 @@ void Tabs::set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy) { void Tabs::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&Tabs::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&Tabs::_gui_input); ClassDB::bind_method(_MD("get_tab_count"),&Tabs::get_tab_count); ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&Tabs::set_current_tab); ClassDB::bind_method(_MD("get_current_tab"),&Tabs::get_current_tab); diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index 81e1c565b5..9ba32297dc 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -92,7 +92,7 @@ private: protected: - void _input_event(const InputEvent& p_event); + void _gui_input(const InputEvent& p_event); void _notification(int p_what); static void _bind_methods(); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c2f6442076..250efb7dc6 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1468,13 +1468,13 @@ void TextEdit::_get_mouse_pos(const Point2i& p_mouse, int &r_row, int &r_col) co r_col=col; } -void TextEdit::_input_event(const InputEvent& p_input_event) { +void TextEdit::_gui_input(const InputEvent& p_gui_input) { - switch(p_input_event.type) { + switch(p_gui_input.type) { case InputEvent::MOUSE_BUTTON: { - const InputEventMouseButton &mb=p_input_event.mouse_button; + const InputEventMouseButton &mb=p_gui_input.mouse_button; if (completion_active && completion_rect.has_point(Point2(mb.x,mb.y))) { @@ -1685,7 +1685,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } break; case InputEvent::MOUSE_MOTION: { - const InputEventMouseMotion &mm=p_input_event.mouse_motion; + const InputEventMouseMotion &mm=p_gui_input.mouse_motion; if (select_identifiers_enabled) { if (mm.mod.command && mm.button_mask==0) { @@ -1728,7 +1728,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { case InputEvent::KEY: { - InputEventKey k=p_input_event.key; + InputEventKey k=p_gui_input.key; #ifdef OSX_ENABLED @@ -4608,7 +4608,7 @@ PopupMenu *TextEdit::get_menu() const { void TextEdit::_bind_methods() { - ClassDB::bind_method(_MD("_input_event"),&TextEdit::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&TextEdit::_gui_input); ClassDB::bind_method(_MD("_scroll_moved"),&TextEdit::_scroll_moved); ClassDB::bind_method(_MD("_cursor_changed_emit"),&TextEdit::_cursor_changed_emit); ClassDB::bind_method(_MD("_text_changed_emit"),&TextEdit::_text_changed_emit); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 2cb3d71386..c7467f9b13 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -333,7 +333,7 @@ protected: void _insert_text(int p_line, int p_column,const String& p_text,int *r_end_line=NULL,int *r_end_char=NULL); void _remove_text(int p_from_line, int p_from_column,int p_to_line,int p_to_column); void _insert_text_at_cursor(const String& p_text); - void _input_event(const InputEvent& p_input); + void _gui_input(const InputEvent& p_input); void _notification(int p_what); void _consume_pair_symbol(CharType ch); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 86fe9cd682..ca0a6d4597 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1955,7 +1955,7 @@ void Tree::popup_select(int p_option) { -void Tree::_input_event(InputEvent p_event) { +void Tree::_gui_input(InputEvent p_event) { switch (p_event.type) { @@ -3567,7 +3567,7 @@ bool Tree::get_allow_rmb_select() const{ void Tree::_bind_methods() { ClassDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout); - ClassDB::bind_method(_MD("_input_event"),&Tree::_input_event); + ClassDB::bind_method(_MD("_gui_input"),&Tree::_gui_input); ClassDB::bind_method(_MD("_popup_select"),&Tree::popup_select); ClassDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter); ClassDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index c69f685176..8327e356b3 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -345,7 +345,7 @@ friend class TreeItem; void popup_select(int p_option); - void _input_event(InputEvent p_event); + void _gui_input(InputEvent p_event); void _notification(int p_what); Size2 get_minimum_size() const; |