diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-18 00:44:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 00:44:45 +0200 |
commit | 3183834c5d5dd27e1be4f581c0fe1a8bef3c4a6e (patch) | |
tree | 46abac2d3fffeddd52548d09b44d4a1cbe6a7bda /tools/editor | |
parent | 523e46ad0a915364de92d209ae59be14fbb3a7a4 (diff) | |
parent | 20c7f2bded2ed4cd30eb6e0c22b1e2605a59500d (diff) |
Merge pull request #5657 from Paulb23/block_caret
Added block caret to TextEdit
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_settings.cpp | 3 | ||||
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | tools/editor/plugins/shader_editor_plugin.cpp | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 7f496d0e22..c150e62754 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -554,6 +554,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { set("text_editor/create_signal_callbacks",true); set("text_editor/autosave_interval_secs",0); + set("text_editor/block_caret", false); set("text_editor/caret_blink", false); set("text_editor/caret_blink_speed", 0.65); hints["text_editor/caret_blink_speed"]=PropertyInfo(Variant::REAL,"text_editor/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1, 10, 0.1"); @@ -685,6 +686,7 @@ void EditorSettings::_load_default_text_editor_theme() { set("text_editor/completion_scroll_color", Color::html("ffffff")); set("text_editor/completion_font_color", Color::html("aaaaaa")); set("text_editor/caret_color",Color::html("aaaaaa")); + set("text_editor/caret_background_color", Color::html("000000")); set("text_editor/line_number_color",Color::html("66aaaaaa")); set("text_editor/text_color",Color::html("aaaaaa")); set("text_editor/text_selected_color",Color::html("000000")); @@ -922,6 +924,7 @@ bool EditorSettings::_save_text_editor_theme(String p_file) { cf->set_value(theme_section, "completion_scroll_color", ((Color)get("text_editor/completion_scroll_color")).to_html()); cf->set_value(theme_section, "completion_font_color", ((Color)get("text_editor/completion_font_color")).to_html()); cf->set_value(theme_section, "caret_color", ((Color)get("text_editor/caret_color")).to_html()); + cf->set_value(theme_section, "caret_background_color", ((Color)get("text_editor/caret_background_color")).to_html()); cf->set_value(theme_section, "line_number_color", ((Color)get("text_editor/line_number_color")).to_html()); cf->set_value(theme_section, "text_color", ((Color)get("text_editor/text_color")).to_html()); cf->set_value(theme_section, "text_selected_color", ((Color)get("text_editor/text_selected_color")).to_html()); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index fc5f552723..12cdc22ae4 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -317,6 +317,7 @@ void ScriptTextEditor::_load_theme_settings() { get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0))); get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0))); get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0))); + get_text_edit()->add_color_override("caret_background_color",EDITOR_DEF("text_editor/caret_background_color",Color(0,0,0))); get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1))); get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1))); get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2))); @@ -2195,6 +2196,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script) { ste->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); ste->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); ste->get_text_edit()->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/show_breakpoint_gutter")); + ste->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); ste->get_text_edit()->set_callhint_settings( EditorSettings::get_singleton()->get("text_editor/put_callhint_tooltip_below_current_line"), EditorSettings::get_singleton()->get("text_editor/callhint_tooltip_offset")); @@ -2362,6 +2364,7 @@ void ScriptEditor::_editor_settings_changed() { ste->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); ste->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); ste->get_text_edit()->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/show_breakpoint_gutter")); + ste->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); } ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/auto_reload_and_parse_scripts_on_save",true)); diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index 9ef84af260..b3317e8313 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -86,6 +86,7 @@ void ShaderTextEditor::_load_theme_settings() { get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0))); get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0))); get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0))); + get_text_edit()->add_color_override("caret_background_color",EDITOR_DEF("text_editor/caret_background_color",Color(0,0,0))); get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1))); get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1))); get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2))); @@ -381,6 +382,7 @@ void ShaderEditor::_editor_settings_changed() { vertex_editor->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); vertex_editor->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); vertex_editor->get_text_edit()->add_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/line_spacing")); + vertex_editor->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); fragment_editor->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete")); fragment_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/scroll_past_end_of_file")); @@ -392,6 +394,7 @@ void ShaderEditor::_editor_settings_changed() { fragment_editor->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); fragment_editor->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); fragment_editor->get_text_edit()->add_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/line_spacing")); + fragment_editor->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); light_editor->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete")); light_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/scroll_past_end_of_file")); @@ -403,6 +406,7 @@ void ShaderEditor::_editor_settings_changed() { light_editor->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); light_editor->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); light_editor->get_text_edit()->add_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/line_spacing")); + light_editor->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); } void ShaderEditor::_bind_methods() { |