diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-07-18 21:34:28 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-07-18 21:42:10 +0200 |
commit | 755689b0e9c2d6c998243e02635284ca37a9879f (patch) | |
tree | 1438b8f73c75ffe6d747a30ef69e85adec53914e /editor/code_editor.cpp | |
parent | 20a3bb9c484431439ffa60a158d7563c466cd530 (diff) | |
download | redot-engine-755689b0e9c2d6c998243e02635284ca37a9879f.tar.gz |
Enable the script editor's "Auto Brace Complete" by default
This also adds a setting hint for the "Code Complete Delay" setting
and cleans up some duplicated default setting values.
This closes #30662.
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 4862d4bb5b..e45ff3fee2 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1426,17 +1426,17 @@ void CodeTextEditor::_on_settings_change() { // AUTO BRACE COMPLETION text_editor->set_auto_brace_completion( - EDITOR_DEF("text_editor/completion/auto_brace_complete", true)); + EDITOR_GET("text_editor/completion/auto_brace_complete")); code_complete_timer->set_wait_time( - EDITOR_DEF("text_editor/completion/code_complete_delay", .3f)); + EDITOR_GET("text_editor/completion/code_complete_delay")); // call hint settings text_editor->set_callhint_settings( - EDITOR_DEF("text_editor/completion/put_callhint_tooltip_below_current_line", true), - EDITOR_DEF("text_editor/completion/callhint_tooltip_offset", Vector2())); + EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"), + EDITOR_GET("text_editor/completion/callhint_tooltip_offset")); - idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay", 2.0)); + idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay")); } void CodeTextEditor::_text_changed_idle_timeout() { @@ -1622,12 +1622,12 @@ CodeTextEditor::CodeTextEditor() { idle = memnew(Timer); add_child(idle); idle->set_one_shot(true); - idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay", 2.0)); + idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay")); code_complete_timer = memnew(Timer); add_child(code_complete_timer); code_complete_timer->set_one_shot(true); - code_complete_timer->set_wait_time(EDITOR_DEF("text_editor/completion/code_complete_delay", .3f)); + code_complete_timer->set_wait_time(EDITOR_GET("text_editor/completion/code_complete_delay")); error_line = 0; error_column = 0; |