diff options
author | Dmitry Koteroff <vortex@verona.im> | 2017-11-20 21:25:13 +0300 |
---|---|---|
committer | Dmitry Koteroff <vortex@verona.im> | 2017-11-20 21:25:13 +0300 |
commit | d67b602f2f995f0044b446646619adf45d37256d (patch) | |
tree | a182714e94348444e749f3d46f6973200d44d734 /scene/gui | |
parent | 82ad05a20ef4420122b18eadf3835c4a8a49ba19 (diff) |
Add "New Folder.." to right mouse button click on project fileslist panel _WHEN_ no any file/folder is under mouse cursor.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/item_list.cpp | 6 |
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); } |