summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMartin Chuckeles <martin@jakubik.info>2016-03-04 11:05:42 +0100
committerMartin Chuckeles <martin@jakubik.info>2016-03-04 12:10:15 +0100
commit47206b409d6802ac9ccbaedaa0daedc30b739e2f (patch)
tree21bc90d19a76a920b66f561858a289b30a0fcbad /tools
parent26cc14e83974b9d865edfb4f03396bdad5a29b87 (diff)
Add editor settings for call hint placement
Added settings: text_editor/put_callhint_tooltip_below_current_line and text_editor/callhint_tooltip_offset
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/code_editor.cpp6
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index fe863bfebc..f7d335fba3 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -568,6 +568,12 @@ void CodeTextEditor::_on_settings_change() {
);
enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true);
+
+ // call hint settings
+ text_editor->set_callhint_settings(
+ EDITOR_DEF("text_editor/put_callhint_tooltip_below_current_line", true),
+ EDITOR_DEF("text_editor/callhint_tooltip_offset", Vector2())
+ );
}
void CodeTextEditor::_text_changed_idle_timeout() {
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 8d0527cff7..474bafee69 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1928,6 +1928,9 @@ void ScriptEditor::edit(const Ref<Script>& p_script) {
ste->set_edited_script(p_script);
ste->get_text_edit()->set_tooltip_request_func(this,"_get_debug_tooltip",ste);
ste->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));
+ 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"));
tab_container->add_child(ste);
_go_to_tab(tab_container->get_tab_count()-1);