godot/scene/main
Pedro J. Estébanez 259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
..
SCsub style: Fix PEP8 whitespace issues in Python files 2016-11-01 00:35:16 +01:00
canvas_layer.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
canvas_layer.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
http_request.cpp Refactor version macros and fix related bugs 2018-02-23 20:15:29 +01:00
http_request.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
instance_placeholder.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
instance_placeholder.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
node.cpp Fix switching WindowDialog types leaves garbage buttons 2018-03-07 18:28:29 +08:00
node.h Fix typos with codespell 2018-02-21 19:46:06 +01:00
resource_preloader.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
resource_preloader.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
scene_tree.cpp Fix oversampled font artifacts after resize 2018-03-19 20:44:26 +07:00
scene_tree.h Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
timer.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
timer.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
viewport.cpp Improve popup menus usability 2018-04-07 01:06:02 +02:00
viewport.h Improve popup menus usability 2018-04-07 01:06:02 +02:00