diff options
| author | Paulb23 | 2016-06-21 17:21:55 +0100 |
|---|---|---|
| committer | Paulb23 | 2016-06-21 17:21:55 +0100 |
| commit | 706895a922d69c5825d2d2a2d51ca205b1b81ea3 (patch) | |
| tree | 7c869a01a07b302c19fe7b7be7fb69150db09240 /scene/gui/text_edit.cpp | |
| parent | a40cb680cae75342ef86443c6996024199b1391d (diff) | |
| download | godot-706895a922d69c5825d2d2a2d51ca205b1b81ea3.tar.gz godot-706895a922d69c5825d2d2a2d51ca205b1b81ea3.tar.zst godot-706895a922d69c5825d2d2a2d51ca205b1b81ea3.zip | |
Added code completion selected color setting
Diffstat (limited to 'scene/gui/text_edit.cpp')
| -rw-r--r-- | scene/gui/text_edit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 326771e30..444b06291 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1041,7 +1041,6 @@ void TextEdit::_notification(int p_what) { if (completion_active) { // code completion box Ref<StyleBox> csb = get_stylebox("completion"); - Ref<StyleBox> csel = get_stylebox("completion_selected"); 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"); @@ -1093,8 +1092,7 @@ void TextEdit::_notification(int p_what) { VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(completion_rect.pos,completion_rect.size+Size2(scrollw,0)),cache.completion_background_color); } int line_from = CLAMP(completion_index - lines/2, 0, completion_options.size() - lines); - draw_style_box(csel,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()))); - + 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); @@ -3287,6 +3285,7 @@ void TextEdit::_update_caches() { cache.style_normal=get_stylebox("normal"); 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.font=get_font("font"); cache.caret_color=get_color("caret_color"); cache.line_number_color=get_color("line_number_color"); |
