|
@@ -1111,7 +1111,7 @@ void TextEdit::_notification(int p_what) {
|
|
|
|
|
|
int l = line_from + i;
|
|
|
ERR_CONTINUE( l < 0 || l>= completion_options.size());
|
|
|
- Color text_color = cache.font_color;
|
|
|
+ Color text_color = cache.completion_font_color;
|
|
|
for(int j=0;j<color_regions.size();j++) {
|
|
|
if (completion_options[l].begins_with(color_regions[j].begin_key)) {
|
|
|
text_color=color_regions[j].color;
|
|
@@ -3312,6 +3312,7 @@ void TextEdit::_update_caches() {
|
|
|
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.completion_font_color=get_color("completion_font_color");
|
|
|
cache.font=get_font("font");
|
|
|
cache.caret_color=get_color("caret_color");
|
|
|
cache.line_number_color=get_color("line_number_color");
|
|
@@ -3609,6 +3610,10 @@ void TextEdit::set_highlight_all_occurrences(const bool p_enabled) {
|
|
|
update();
|
|
|
}
|
|
|
|
|
|
+bool TextEdit::is_highlight_all_occurrences_enabled() const {
|
|
|
+ return highlight_all_occurrences;
|
|
|
+}
|
|
|
+
|
|
|
int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column) {
|
|
|
int col = -1;
|
|
|
|
|
@@ -4318,6 +4323,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();
|
|
@@ -4432,6 +4441,12 @@ 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_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences);
|
|
|
+ ObjectTypeDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_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);
|
|
|
|
|
@@ -4444,7 +4459,10 @@ 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, "highlight_all_occurrences"), _SCS("set_highlight_all_occurrences"), _SCS("is_highlight_all_occurrences_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"));
|