From 9d9d0f0bc995a4db9ee1e823380076bf2aca70d8 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Mon, 25 Jan 2021 17:37:05 +0300 Subject: Fix minimap capturing events and improve its theme Add an editor setting for minimap opacity in visual editors --- modules/visual_script/visual_script_editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 1e82259e59..78e4a7f113 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -981,6 +981,10 @@ void VisualScriptEditor::_update_graph(int p_only_id) { } _update_graph_connections(); + + float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity"); + graph->set_minimap_opacity(graph_minimap_opacity); + // Use default_func instead of default_func for now I think that should be good stop gap solution to ensure not breaking anything. graph->call_deferred("set_scroll_ofs", script->get_scroll() * EDSCALE); updating_graph = false; @@ -4326,6 +4330,8 @@ VisualScriptEditor::VisualScriptEditor() { graph->connect("duplicate_nodes_request", callable_mp(this, &VisualScriptEditor::_on_nodes_duplicate)); graph->connect("gui_input", callable_mp(this, &VisualScriptEditor::_graph_gui_input)); graph->set_drag_forwarding(this); + float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity"); + graph->set_minimap_opacity(graph_minimap_opacity); graph->hide(); graph->connect("scroll_offset_changed", callable_mp(this, &VisualScriptEditor::_graph_ofs_changed)); -- cgit v1.2.3