summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2016-04-08 20:05:50 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2016-04-08 20:11:16 +0100
commit8c328474f2b2397fb4bcc3fc84402a0305383da6 (patch)
tree234c773257a4a247424c3d48a0a48dc3d68697f3 /scene
parentd454e64f429affb89de036eed6daa5c6e5278492 (diff)
Setting to change line number color
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp5
-rw-r--r--scene/gui/text_edit.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index a0887ffacd..f7461a736c 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -682,14 +682,12 @@ void TextEdit::_notification(int p_what) {
}
if (cache.line_number_w) {
- Color fcol = cache.font_color;
- fcol.a*=0.4;
String fc = String::num(line+1);
while (fc.length() < line_number_char_count) {
fc="0"+fc;
}
- cache.font->draw(ci,Point2(cache.style_normal->get_margin(MARGIN_LEFT),ofs_y+cache.font->get_ascent()),fc,fcol);
+ cache.font->draw(ci,Point2(cache.style_normal->get_margin(MARGIN_LEFT),ofs_y+cache.font->get_ascent()),fc,cache.line_number_color);
}
const Map<int,Text::ColorRegionInfo>& cri_map=text.get_color_region_info(line);
@@ -3083,6 +3081,7 @@ void TextEdit::_update_caches() {
cache.style_focus=get_stylebox("focus");
cache.font=get_font("font");
cache.caret_color=get_color("caret_color");
+ cache.line_number_color=get_color("line_number_color");
cache.font_color=get_color("font_color");
cache.font_selected_color=get_color("font_selected_color");
cache.keyword_color=get_color("keyword_color");
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 899ce533c4..09c2a4d729 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -74,6 +74,7 @@ class TextEdit : public Control {
Ref<StyleBox> style_focus;
Ref<Font> font;
Color caret_color;
+ Color line_number_color;
Color font_color;
Color font_selected_color;
Color keyword_color;