renamed _input_event for GUI events to _gui_input, so it's more differentiated than generalized _input

This commit is contained in:
Juan Linietsky 2017-01-08 16:28:12 -03:00
parent 0a59c3c3a6
commit 920947f297
117 changed files with 229 additions and 224 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -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"));

View file

@ -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"));
}

View file

@ -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();

View file

@ -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") );

View file

@ -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;

View file

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

View file

@ -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();

View file

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

View file

@ -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;

View file

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

View file

@ -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();

View file

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

View file

@ -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:

View file

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

View file

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

View file

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

View file

@ -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:

View file

@ -31,7 +31,7 @@
void Popup::_input_event(InputEvent p_event) {
void Popup::_gui_input(InputEvent p_event) {
}

View file

@ -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();

View file

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

View file

@ -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();

View file

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

View file

@ -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;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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;

View file

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

View file

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

View file

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

View file

@ -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:

View file

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

View file

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

View file

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

View file

@ -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();

View file

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

View file

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

View file

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

View file

@ -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;

View file

@ -1605,12 +1605,12 @@ void Viewport::_gui_call_input(Control *p_control,const InputEvent& p_input) {
Control *control = ci->cast_to<Control>();
if (control) {
control->call_multilevel(SceneStringNames::get_singleton()->_input_event,ev);
control->call_multilevel(SceneStringNames::get_singleton()->_gui_input,ev);
if (gui.key_event_accepted)
break;
if (!control->is_inside_tree())
break;
control->emit_signal(SceneStringNames::get_singleton()->input_event,ev);
control->emit_signal(SceneStringNames::get_singleton()->gui_input,ev);
if (!control->is_inside_tree() || control->is_set_as_toplevel())
break;
if (gui.key_event_accepted)
@ -2099,9 +2099,9 @@ void Viewport::_gui_input_event(InputEvent p_event) {
gui.key_event_accepted=false;
if (gui.key_focus->can_process()) {
gui.key_focus->call_multilevel("_input_event",p_event);
gui.key_focus->call_multilevel(SceneStringNames::get_singleton()->_gui_input,p_event);
if (gui.key_focus) //maybe lost it
gui.key_focus->emit_signal(SceneStringNames::get_singleton()->input_event,p_event);
gui.key_focus->emit_signal(SceneStringNames::get_singleton()->gui_input,p_event);
}
@ -2409,7 +2409,7 @@ void Viewport::_gui_grab_click_focus(Control *p_control) {
mb.y=click.y;
mb.button_index=gui.mouse_focus_button;
mb.pressed=false;
gui.mouse_focus->call_deferred("_input_event",ie);
gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input,ie);
gui.mouse_focus=p_control;
@ -2419,7 +2419,7 @@ void Viewport::_gui_grab_click_focus(Control *p_control) {
mb.y=click.y;
mb.button_index=gui.mouse_focus_button;
mb.pressed=true;
gui.mouse_focus->call_deferred("_input_event",ie);
gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input,ie);
}
}

View file

@ -116,6 +116,9 @@ SceneStringNames::SceneStringNames() {
_input_event=StaticCString::create("_input_event");
gui_input=StaticCString::create("gui_input");
_gui_input=StaticCString::create("_gui_input");
changed=StaticCString::create("changed");
_shader_changed=StaticCString::create("_shader_changed");

View file

@ -54,6 +54,8 @@ public:
StringName visibility_changed;
StringName input_event;
StringName _input_event;
StringName gui_input;
StringName _gui_input;
StringName item_rect_changed;
StringName shader_shader;
StringName shader_unshaded;

View file

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

View file

@ -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();

View file

@ -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");

View file

@ -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();

View file

@ -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"));

View file

@ -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");

View file

@ -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");
}

View file

@ -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:

View file

@ -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;
}
}

View file

@ -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();

View file

@ -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);
}

View file

@ -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:

View file

@ -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";

View file

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

View file

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

View file

@ -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")));
}

View file

@ -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();

View file

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

View file

@ -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:

View file

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

View file

@ -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:

View file

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

View file

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

View file

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

View file

@ -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; }

View file

@ -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;

View file

@ -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; }

View file

@ -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;

View file

@ -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; }

View file

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

View file

@ -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; }

View file

@ -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);
}

View file

@ -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:

View file

@ -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);
}

View file

@ -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:

View file

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

View file

@ -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; }

View file

@ -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;

View file

@ -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; }

View file

@ -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;

View file

@ -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; }

View file

@ -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;

View file

@ -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; }

View file

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

View file

@ -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:

View file

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

View file

@ -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:

View file

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

View file

@ -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:

View file

@ -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"));

View file

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

View file

@ -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); }

Some files were not shown because too many files have changed in this diff Show more