godot/scene/gui
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
..
base_button.cpp Fix BaseButton not always calling _pressed() 2018-03-05 20:37:10 -05:00
base_button.h Fix typos in code and docs with codespell 2018-01-18 22:01:42 +01:00
box_container.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
box_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
button.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
button.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
center_container.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
center_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
check_box.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
check_box.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
check_button.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
check_button.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
color_picker.cpp Various ui tweaks for color picker 2018-03-12 13:58:31 +01:00
color_picker.h Various ui tweaks for color picker 2018-03-12 13:58:31 +01:00
color_rect.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
color_rect.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
container.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
control.cpp Merge pull request #16566 from groud/gui_input_rework 2018-02-19 20:05:35 +01:00
control.h Changes the keep_margin parameter to true by default, so that people are not suprised that set_anchor changes the margins values 2018-01-15 10:37:13 +01:00
dialogs.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
dialogs.h Fix typos with codespell 2018-02-21 19:46:06 +01:00
file_dialog.cpp Fixed disappearing text on filedialog buttons 2018-02-21 16:04:51 +02:00
file_dialog.h Fixed "Open" button being enabled when nothing is selected in a FileDialog while in "Open folder" mode. 2018-02-20 12:19:06 -03:00
gradient_edit.cpp Fix weird editor crash when switching from editing one gradient to another keeps 'grabbing' variable to true 2018-02-14 16:48:13 +01:00
gradient_edit.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
graph_edit.cpp Expose a few GraphEdit methods to script languages 2018-01-30 22:09:41 -02:00
graph_edit.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
graph_node.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
graph_node.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
grid_container.cpp Fixes wrong calculation of gridcontainer's children size 2018-03-18 22:33:17 +01:00
grid_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
item_list.cpp Merge pull request #17345 from AlexHolly/expose-itemlist-move-item 2018-03-13 20:05:00 +01:00
item_list.h expose Itemlist.move_item and optimize functionality 2018-03-13 15:19:43 +01:00
label.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
label.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
line_edit.cpp Line edit up/down focus pass through 2018-02-23 13:01:28 +01:00
line_edit.h Fixed #15082: line edit emits two "text_changed" signals when pasting while text is selected 2018-02-05 16:22:34 +01:00
link_button.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
link_button.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
margin_container.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
margin_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
menu_button.cpp Improve popup menus usability 2018-04-07 01:06:02 +02:00
menu_button.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
nine_patch_rect.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
nine_patch_rect.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
option_button.cpp Add item_focused signal to OptionButton 2018-02-23 13:01:28 +01:00
option_button.h Add item_focused signal to OptionButton 2018-02-23 13:01:28 +01:00
panel.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
panel.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
panel_container.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
panel_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
popup.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
popup.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
popup_menu.cpp Improve popup menus usability 2018-04-07 01:06:02 +02:00
popup_menu.h Improve popup menus usability 2018-04-07 01:06:02 +02:00
progress_bar.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
progress_bar.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
range.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
range.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
reference_rect.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
reference_rect.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
rich_text_label.cpp Fix bad rendering of BBCode tables in RichTextLabel 2018-03-18 18:06:24 +01:00
rich_text_label.h Fix bad rendering of BBCode tables in RichTextLabel 2018-03-18 18:06:24 +01:00
scroll_bar.cpp Add two new default actions ui_end, ui_home 2018-02-23 13:01:28 +01:00
scroll_bar.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
scroll_container.cpp doc: Replace some more "val" with "value" + sync 2018-01-17 10:43:23 +01:00
scroll_container.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
SCsub style: Fix PEP8 whitespace issues in Python files 2016-11-01 00:35:16 +01:00
separator.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
separator.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
shortcut.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
shortcut.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
slider.cpp Add two new default actions ui_end, ui_home 2018-02-23 13:01:28 +01:00
slider.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
spin_box.cpp SpinBoxes calculate correctly their width before first redraw. 2018-02-05 22:42:30 +01:00
spin_box.h SpinBoxes calculate correctly their width before first redraw. 2018-02-05 22:42:30 +01:00
split_container.cpp Fixes a bas resizing with SplitContainer 2018-01-20 21:03:20 +01:00
split_container.h Fixes a bas resizing with SplitContainer 2018-01-20 21:03:20 +01:00
tab_container.cpp Keep to show current script when closing all docs 2018-02-20 14:39:52 +09:00
tab_container.h Keep to show current script when closing all docs 2018-02-20 14:39:52 +09:00
tabs.cpp Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
tabs.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
text_edit.cpp Merge pull request #17314 from robfram/complete-path-15813 2018-03-13 12:16:51 +01:00
text_edit.h Merge pull request #15618 from ianb96/fold_comment 2018-02-14 16:36:42 +01:00
texture_button.cpp The TextureButton's bitmask takes into account the stretch mode selected 2018-01-19 00:01:23 +01:00
texture_button.h The TextureButton's bitmask takes into account the stretch mode selected 2018-01-19 00:01:23 +01:00
texture_progress.cpp Implement line clipping for TextureProgress to avoid bad rendering due to imprecise UV mapping 2018-03-10 20:51:42 +01:00
texture_progress.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
texture_rect.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
texture_rect.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
tool_button.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
tool_button.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
tree.cpp Merge pull request #16947 from Faless/ui_actions 2018-03-16 20:55:11 +01:00
tree.h Tree now uses UI actions instead of keys 2018-02-23 12:58:35 +01:00
video_player.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
video_player.h Fix Video Player issue with audio mix_rate when different than 44100 2018-01-07 12:57:48 -03:00
viewport_container.cpp ViewportContainer passes input down to children viewports 2018-01-15 00:36:57 +01:00
viewport_container.h ViewportContainer passes input down to children viewports 2018-01-15 00:36:57 +01:00