diff options
author | Jeremy Bullock <jcbullock@gmail.com> | 2019-04-09 11:22:14 -0600 |
---|---|---|
committer | Jeremy Bullock <jcbullock@gmail.com> | 2019-04-09 11:22:14 -0600 |
commit | 36bdf789274ca5b8daf41fddf5f5d05471812c1e (patch) | |
tree | e6d31ddb7de8c78df479e42fd6d3acad1699bdd0 /scene | |
parent | 5772f60f960ee8c396574f0c6f94def18bb210c7 (diff) |
Allow Right Click in Empty Space on FileSystemDock
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 7f00e7bd24..2821893a74 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1970,6 +1970,9 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool item_h += child_h; } } + if (p_item == root && p_button == BUTTON_RIGHT) { + emit_signal("empty_rmb", get_local_mouse_position()); + } } return item_h; // nothing found @@ -3850,6 +3853,7 @@ void Tree::_bind_methods() { ADD_SIGNAL(MethodInfo("cell_selected")); ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::BOOL, "selected"))); ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::VECTOR2, "position"))); + ADD_SIGNAL(MethodInfo("empty_rmb", PropertyInfo(Variant::VECTOR2, "position"))); ADD_SIGNAL(MethodInfo("empty_tree_rmb_selected", PropertyInfo(Variant::VECTOR2, "position"))); ADD_SIGNAL(MethodInfo("item_edited")); ADD_SIGNAL(MethodInfo("item_rmb_edited")); |