summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp11
-rw-r--r--scene/gui/text_edit.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index a010fff2bc..ebf11b7684 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4319,6 +4319,10 @@ void TextEdit::set_show_line_numbers(bool p_show) {
update();
}
+bool TextEdit::is_show_line_numbers_enabled() const {
+ return line_numbers;
+}
+
void TextEdit::set_draw_breakpoint_gutter(bool p_draw) {
draw_breakpoint_gutter = p_draw;
update();
@@ -4433,6 +4437,9 @@ void TextEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("redo"),&TextEdit::redo);
ObjectTypeDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history);
+ ObjectTypeDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers);
+ ObjectTypeDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled);
+
ObjectTypeDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring);
ObjectTypeDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled);
@@ -4445,7 +4452,9 @@ void TextEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("menu_option"),&TextEdit::menu_option);
ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));;
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), _SCS("set_show_line_numbers"), _SCS("is_show_line_numbers_enabled"));
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
ADD_SIGNAL(MethodInfo("cursor_changed"));
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index fe977eba60..55612a5e27 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -469,6 +469,7 @@ public:
void menu_option(int p_option);
void set_show_line_numbers(bool p_show);
+ bool is_show_line_numbers_enabled() const;
void set_draw_breakpoint_gutter(bool p_draw);
bool is_drawing_breakpoint_gutter() const;