From 8b47e26f59ddca57f95dfae5ce807d382957a97e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 15 May 2016 20:25:51 -0300 Subject: Changes to FileSystem Dock -Replaced buttons for file actions fo RMB menu -Added a split mode, if the dock is not sharing vertical space with anything else -imroved drag and drop support --- scene/gui/item_list.cpp | 60 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 13 deletions(-) (limited to 'scene/gui/item_list.cpp') diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 7041f86f16..c1a0e43e49 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -410,16 +410,18 @@ void ItemList::_input_event(const InputEvent& p_event) { defer_select_single=-1; return; } + if (defer_select_single>=0 && p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT && !p_event.mouse_button.pressed) { select(defer_select_single,true); + emit_signal("multi_selected",defer_select_single,true); defer_select_single=-1; return; } - if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT && p_event.mouse_button.pressed) { + if (p_event.type==InputEvent::MOUSE_BUTTON && (p_event.mouse_button.button_index==BUTTON_LEFT || (allow_rmb_select && p_event.mouse_button.button_index==BUTTON_RIGHT)) && p_event.mouse_button.pressed) { const InputEventMouseButton &mb = p_event.mouse_button; @@ -458,6 +460,7 @@ void ItemList::_input_event(const InputEvent& p_event) { if (select_mode==SELECT_MULTI && items[i].selected && mb.mod.command) { unselect(i); emit_signal("multi_selected",i,false); + } else if (select_mode==SELECT_MULTI && mb.mod.shift && current>=0 && current