summaryrefslogtreecommitdiff
path: root/scene/gui/popup_menu.cpp
AgeCommit message (Collapse)Author
2019-04-22Merge pull request #27673 from qarmin/small_fixesRémi Verschelde
Small fixes, mostly duplicated code
2019-04-08Small fixes, mostly dupicated codeqarmin
2019-03-11Fixed optional idx argument in add_item (OptionMeny & PopupMenu)xDGameStudios
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-15Revert "Fix MenuButton item label disappearing when setting shortcut."Rémi Verschelde
2019-02-14Fix MenuButton item label disappearing when setting shortcut.Unknown
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-15Fix item highlighting in PopupMenu for items with offsetMichael Alexsander Silva Dias
2018-11-11Fixed various uninitialised member variables in editor plugins.Ibrahn Sahir
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-11-01Merge pull request #21962 from YeldhamDev/switch_hover_submenuJuan Linietsky
Fix MenuButton hover switching not happening with submenus open
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-11Fix MenuButton hover switching not happening with submenus openMichael Alexsander Silva Dias
2018-08-17Merge pull request #21091 from hpvb/fix-removing-popup-menu-itemRémi Verschelde
Call minimum_size_changed() in PopupMenu::remove_item()
2018-08-16Call minimum_size_changed() in PopupMenu::remove_item()Hein-Pieter van Braam
When removing an item from a PopupMenu we need to update the control's size cache otherwise the size of the PopupMenu itself lags behind by 1 item size. Meaning the PopupMenu will remain too large.
2018-08-16Delay emitting pressed signals in PopupMenuHein-Pieter van Braam
When processing items we may actually delete the item we're processing in the callback for the signal. To avoid this, call the signal after we're done processing the items. But before hiding the popupmenu itself. Thanks to @reduz for writing the whole solution. This fixes #19842
2018-08-16PopupMenu item_pressed is sent before checking hide flags.Ovnuniarchos
2018-08-13Emit pressed events after processing itemsHein-Pieter van Braam
When processing items we may actually delete the item we're processing in the callback for the signal. To avoid this, call the signal after we're done processing the items. This fixes #19842
2018-07-29Merge pull request #15269 from ianb96/context_menu_improvementsJuan Linietsky
Context Menu Improvements
2018-07-26context menu improvementsIan
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-14Visual Shaders are back.Juan Linietsky
2018-07-09Add ability to set submenu's popup delay time on mouse hoveringAndrii Doroshenko (Xrayez)
This allows to set delay time for the submenu to popup. Setting this value low can increase responsiveness. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item.
2018-06-07Entirely new (and much improved) animation editor.Juan Linietsky
2018-05-17-Ability to open resources in the same windowJuan Linietsky
-Plenty of fixes and improvements to new inspector -Fixes that were needed to make inspector work better
2018-04-09Add support for radio-looking items with iconPedro J. Estébanez
Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit. Fixes #18063.
2018-04-07Merge pull request #17730 from RandomShaper/radio-buttons-in-menusJuan Linietsky
Radio buttons in menus
2018-04-07Improve popup menus usabilityPedro J. Estébanez
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-03-27Add radio-button-looking entries to PopupMenuPedro J. Estébanez
They work exactly the same as current checkbox-decorated items, but in order to preserve compatibility, separate methods are used, like `add_radio_check_item()`. The other option would have been to add a new parameter at the end of `add_check_item()` and the like, but that would have forced callers to provide the defaults manually. `is_item_checkable()`, `is_item_checked()` and `set_item_checked()` are used regardless the item is set to look as check box or radio button. Keeping check in the name adds an additional clue about these facts. Closes #13055.
2018-02-23Add item_focused signal to OptionButtonFabio Alessandrelli
And id_focused to Popupmenu.
2018-02-23Popupmenu now uses UI actions instead of keysFabio Alessandrelli
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
2018-01-07Corrects wrong scrolling for short popups broken in 15405Bernhard Liebl
2018-01-06Allow popup menu scrolling without mouse wheelBernhard Liebl
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-05Fix PopupMenu to show & detect properly hover areavolzhs
Fix #15275
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-17Merge pull request #14748 from YeldhamDev/popupmenu_circlebackRémi Verschelde
Made highlighted item in PopupMenu circle back to the beginning/end when using the keyboard
2017-12-16More changes to PopupMenu's submenu keyboard handling.Michael Alexsander Silva Dias
2017-12-16Made highlighted item in PopupMenu circle back to the beginning/end when ↵Michael Alexsander Silva Dias
using the keyboard.
2017-12-15Enhancements and fixes for PopupMenu's submenus.Michael Alexsander Silva Dias
2017-12-12Change statable to multistate, remove extra separatorPoommetee Ketson
2017-12-10Merge pull request #11510 from AndreaCatania/skelRémi Verschelde
Added skeleton x-ray
2017-12-10Implemented skeleton visibilityAndreaCatania
Removed code visibility code from popup menu
2017-12-06Fixed PopupMenu's submenus not showing up in certain situations.Michael Alexsander Silva Dias
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-18Rename localization method to `tr` againRémi Verschelde
Partial revert of #10380 based on contributor ~~bullying~~ feedback.
2017-08-17Rename `XL_MESSAGE` aka `tr` to `localize`Rémi Verschelde
Also renames `set_message_translation` to `set_message_localization` for consistency.
2017-08-10Removes type information from method bindsIgnacio Etcheverry