summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-20 22:44:23 +0100
committerGitHub <noreply@github.com>2017-11-20 22:44:23 +0100
commitddc7793bba593548cd695d2cdf13f1f7363b3f08 (patch)
tree7f00c7ecc57a33a8db8d28eca76728e5d345976f /scene/gui
parent0442bd6e186428becdb19f152f47c5364e292cfd (diff)
parentd67b602f2f995f0044b446646619adf45d37256d (diff)
Merge pull request #13105 from Krakean/master
Files list: Add "New Folder.." popup when nothing under mouse cursor
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/item_list.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index e9e9dcc859..5e4dedcb48 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -525,6 +525,11 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
return;
}
+ if (mb->get_button_index() == BUTTON_RIGHT) {
+ emit_signal("rmb_clicked", mb->get_position());
+
+ return;
+ }
}
if (mb.is_valid() && mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
@@ -1397,6 +1402,7 @@ void ItemList::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::VECTOR2, "at_position")));
ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "selected")));
ADD_SIGNAL(MethodInfo("item_activated", PropertyInfo(Variant::INT, "index")));
+ ADD_SIGNAL(MethodInfo("rmb_clicked", PropertyInfo(Variant::VECTOR2, "at_position")));
GLOBAL_DEF("gui/timers/incremental_search_max_interval_msec", 2000);
}