summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2020-02-19 16:27:19 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-20 08:24:50 +0100
commit69c95f4b4c128a22777af1e155bc24c7033decca (patch)
tree0add52fc270f808b4b2ad0bf7c970d72338c667e /scene/gui/text_edit.cpp
parent1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff)
downloadredot-engine-69c95f4b4c128a22777af1e155bc24c7033decca.tar.gz
Reworked signal connection system, added support for Callable and Signal objects and made them default.
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index ae169e3dcd..313b82035c 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -7223,10 +7223,10 @@ TextEdit::TextEdit() {
updating_scrolls = false;
selection.active = false;
- h_scroll->connect("value_changed", this, "_scroll_moved");
- v_scroll->connect("value_changed", this, "_scroll_moved");
+ h_scroll->connect_compat("value_changed", this, "_scroll_moved");
+ v_scroll->connect_compat("value_changed", this, "_scroll_moved");
- v_scroll->connect("scrolling", this, "_v_scroll_input");
+ v_scroll->connect_compat("scrolling", this, "_v_scroll_input");
cursor_changed_dirty = false;
text_changed_dirty = false;
@@ -7243,7 +7243,7 @@ TextEdit::TextEdit() {
caret_blink_timer = memnew(Timer);
add_child(caret_blink_timer);
caret_blink_timer->set_wait_time(0.65);
- caret_blink_timer->connect("timeout", this, "_toggle_draw_caret");
+ caret_blink_timer->connect_compat("timeout", this, "_toggle_draw_caret");
cursor_set_blink_enabled(false);
right_click_moves_caret = true;
@@ -7251,12 +7251,12 @@ TextEdit::TextEdit() {
add_child(idle_detect);
idle_detect->set_one_shot(true);
idle_detect->set_wait_time(GLOBAL_GET("gui/timers/text_edit_idle_detect_sec"));
- idle_detect->connect("timeout", this, "_push_current_op");
+ idle_detect->connect_compat("timeout", this, "_push_current_op");
click_select_held = memnew(Timer);
add_child(click_select_held);
click_select_held->set_wait_time(0.05);
- click_select_held->connect("timeout", this, "_click_selection_held");
+ click_select_held->connect_compat("timeout", this, "_click_selection_held");
current_op.type = TextOperation::TYPE_NONE;
undo_enabled = true;
@@ -7314,7 +7314,7 @@ TextEdit::TextEdit() {
add_child(menu);
readonly = true; // Initialise to opposite first, so we get past the early-out in set_readonly.
set_readonly(false);
- menu->connect("id_pressed", this, "menu_option");
+ menu->connect_compat("id_pressed", this, "menu_option");
first_draw = true;
executing_line = -1;