summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2020-09-18 20:45:47 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2021-06-01 15:38:45 +0100
commitc1b9971ad833adb6cfced27c56e9098ac01bd277 (patch)
tree3adf02507ba5aab71e08b6735b432b8c637761ce /editor
parent1c166737986a4c30fa5327f5f5eb97906dfa8abf (diff)
downloadredot-engine-c1b9971ad833adb6cfced27c56e9098ac01bd277.tar.gz
Move and expose Code Hint in CodeEdit
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp4
-rw-r--r--editor/editor_settings.cpp1
-rw-r--r--editor/plugins/script_text_editor.cpp4
-rw-r--r--editor/plugins/shader_editor_plugin.cpp4
4 files changed, 3 insertions, 10 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 67a2d11670..be42eab636 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1564,9 +1564,7 @@ void CodeTextEditor::_on_settings_change() {
EDITOR_GET("text_editor/completion/code_complete_delay"));
// Call hint settings.
- text_editor->set_callhint_settings(
- EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"),
- EDITOR_GET("text_editor/completion/callhint_tooltip_offset"));
+ text_editor->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"));
idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay"));
}
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 28b01c0d18..4c21fb4569 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -571,7 +571,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/completion/code_complete_delay", 0.3);
hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
_initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true);
- _initial_set("text_editor/completion/callhint_tooltip_offset", Vector2());
_initial_set("text_editor/completion/complete_file_paths", true);
_initial_set("text_editor/completion/add_type_hints", false);
_initial_set("text_editor/completion/use_single_quotes", false);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 6836a877dd..a29e51e8fb 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1824,9 +1824,7 @@ ScriptTextEditor::ScriptTextEditor() {
update_settings();
- code_editor->get_text_editor()->set_callhint_settings(
- EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"),
- EditorSettings::get_singleton()->get("text_editor/completion/callhint_tooltip_offset"));
+ code_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"));
code_editor->get_text_editor()->set_select_identifiers_on_hover(true);
code_editor->get_text_editor()->set_context_menu_enabled(false);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index c100923167..3beef78bfc 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -663,9 +663,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ShaderEditor::_editor_settings_changed));
ProjectSettingsEditor::get_singleton()->connect("confirmed", callable_mp(this, &ShaderEditor::_project_settings_changed));
- shader_editor->get_text_editor()->set_callhint_settings(
- EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"),
- EditorSettings::get_singleton()->get("text_editor/completion/callhint_tooltip_offset"));
+ shader_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"));
shader_editor->get_text_editor()->set_select_identifiers_on_hover(true);
shader_editor->get_text_editor()->set_context_menu_enabled(false);