summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2016-03-11 18:10:01 +0000
committerPaulb23 <p_batty@hotmail.co.uk>2016-03-14 15:13:45 +0000
commit9234bd3ff9a3ff025368a1882ccfb91ca1b96ff1 (patch)
treeb80a1bdac19b90b1e9e359faf6aaa323302dbf7e /scene
parent6e86a0535050855d5c4e4d63002eea084f2e3ebf (diff)
Added configuable tab size
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/text_edit.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 32f4be5d17..503aa5de98 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3495,6 +3495,13 @@ void TextEdit::_push_current_op() {
}
+void TextEdit::set_tab_size(const int p_size) {
+ ERR_FAIL_COND(p_size <= 0);
+ tab_size = p_size;
+ text.set_tab_size(p_size);
+ update();
+}
+
void TextEdit::set_draw_tabs(bool p_draw) {
draw_tabs=p_draw;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 2eff8e89c7..ac8136cd8b 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -378,7 +378,7 @@ public:
void redo();
void clear_undo_history();
-
+ void set_tab_size(const int p_size);
void set_draw_tabs(bool p_draw);
bool is_drawing_tabs() const;