summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2021-01-25 17:37:05 +0300
committerYuri Sizov <yuris@humnom.net>2021-01-25 21:49:07 +0300
commit9d9d0f0bc995a4db9ee1e823380076bf2aca70d8 (patch)
tree596a39602641ab25bf77583473c0fcceba5b10d3 /scene/gui
parent71f0b4f4b94f39631128f426950f0a7703087b03 (diff)
Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/graph_edit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 6662992d46..bc87aabb2c 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -154,6 +154,10 @@ Vector2 GraphEditMinimap::_convert_to_graph_position(const Vector2 &p_position)
}
void GraphEditMinimap::_gui_input(const Ref<InputEvent> &p_ev) {
+ if (!ge->is_minimap_enabled()) {
+ return;
+ }
+
Ref<InputEventMouseButton> mb = p_ev;
Ref<InputEventMouseMotion> mm = p_ev;
@@ -1754,7 +1758,7 @@ GraphEdit::GraphEdit() {
top_layer->add_child(minimap);
minimap->set_name("_minimap");
minimap->set_modulate(Color(1, 1, 1, minimap_opacity));
- minimap->set_mouse_filter(MOUSE_FILTER_STOP);
+ minimap->set_mouse_filter(MOUSE_FILTER_PASS);
minimap->set_custom_minimum_size(Vector2(50, 50));
minimap->set_size(minimap_size);
minimap->set_anchors_preset(Control::PRESET_BOTTOM_RIGHT);