diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2016-06-21 17:34:38 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2016-06-21 17:34:38 +0100 |
commit | 45f0dec55c64c62f6f47b6fc6735af33afb6e028 (patch) | |
tree | 7984a2eb07edb33c2db9667965cb884b8c4f83c0 /scene | |
parent | 706895a922d69c5825d2d2a2d51ca205b1b81ea3 (diff) |
Added code completion existing color setting
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 5 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 1 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 444b06291b..68d3179baf 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1043,8 +1043,6 @@ void TextEdit::_notification(int p_what) { Ref<StyleBox> csb = get_stylebox("completion"); int maxlines = get_constant("completion_lines"); int cmax_width = get_constant("completion_max_width")*cache.font->get_char_size('x').x; - Color existing = get_color("completion_existing"); - existing.a=0.2; int scrollw = get_constant("completion_scroll_width"); Color scrollc = get_color("completion_scroll_color"); @@ -1093,7 +1091,7 @@ void TextEdit::_notification(int p_what) { } int line_from = CLAMP(completion_index - lines/2, 0, completion_options.size() - lines); VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(Point2(completion_rect.pos.x,completion_rect.pos.y+(completion_index-line_from)*get_row_height()),Size2(completion_rect.size.width,get_row_height())),cache.completion_selected_color); - draw_rect(Rect2(completion_rect.pos,Size2(nofs,completion_rect.size.height)),existing); + draw_rect(Rect2(completion_rect.pos,Size2(nofs,completion_rect.size.height)),cache.completion_existing_color); @@ -3286,6 +3284,7 @@ void TextEdit::_update_caches() { cache.style_focus=get_stylebox("focus"); cache.completion_background_color=get_color("completion_background_color"); cache.completion_selected_color=get_color("completion_selected_color"); + cache.completion_existing_color=get_color("completion_existing_color"); cache.font=get_font("font"); cache.caret_color=get_color("caret_color"); cache.line_number_color=get_color("line_number_color"); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 336733611a..acac687b59 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -76,6 +76,7 @@ class TextEdit : public Control { Ref<Font> font; Color completion_background_color; Color completion_selected_color; + Color completion_existing_color; Color caret_color; Color line_number_color; Color font_color; diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 63e45b776d..db45a998c3 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -470,7 +470,6 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F t->set_font("font","TextEdit", default_font ); t->set_color("completion_scroll_color","TextEdit", control_font_color_pressed ); - t->set_color("completion_existing","TextEdit", control_font_color ); t->set_color("font_color","TextEdit", control_font_color ); t->set_color("font_color_selected","TextEdit", Color(0,0,0) ); t->set_color("selection_color","TextEdit", font_color_selection ); |