summaryrefslogtreecommitdiff
path: root/scene/gui/popup_menu.h
AgeCommit message (Collapse)Author
2023-01-09Removed unused property hints and `Object::get_translatable_strings()`Juan Linietsky
* Remove unused `EditorPropertyMember` and related hints, previouly used by VisualScript. Such logic should be implemented in the VS module itself. * As the above broke compatibility with the VS module, clean up the other hacks that were still in core in support of VisualScript. * `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's `get_translatable_strings()`, which is a legacy function not used anywhere. So both are removed. * Reordered some usage flags after the above removal to minimize the diff. * General clean up. Fixes #30203. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-08Use BitField<> in core type masksJuan Linietsky
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-09-26Ensure popup menu redraws items when shortcuts update.Eric M
2022-09-06Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()`Michael Alexsander
2022-09-01Add dumb and manual theme caching systems to WindowYuri Sizov
2022-08-18Implement `MenuBar` control to wrap `PopupMenu`s or native menu, use native ↵bruvzg
menu for editor.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-06Refactor Font configuration and import UI, and Font resources.bruvzg
2022-06-15Expose PopupMenu set/get_item_horizontal_offset()FireForge
- Renames setter from set_item_h_offset() - Adds getter
2022-06-13Single-window mode popups and edited scene windows fixes.bruvzg
Fix single-window mode popup not closing when OptionBox is clicked. Fix single-window mode submenus closing when parent menu item, that was used to open it is clicked (using same safe-area logic as platform specific code). Disallow windows that are part of an edited scene from being set as exclusive or popup to prevent it from locking up the editor.
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-04-13Fix sub-menu keyboard navigation.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-02-06Enhancements and fixes for `OptionButton` and `PopupMenu`Michael Alexsander
2022-01-15OptionButton::pressed(): give focus to selectedRicardo Buring
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-03Implement inspector property array for `PopupMenu` and `MenuButton`rafallus
2021-09-02Make some enhancements to the POT generationMichael Alexsander
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-07-22Make `MenuButton`'s `switch_on_hover` work againMichael Alexsander
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-02-16Fix various small issues with PopupMenuMichael Alexsander
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-27Added optional id parameter to `PopupMenu::add_separator`Yuri Roubinsky
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-08Added hysteresis for popup sub-menusEric M
This adds a small lag effect when opening submenus which allow the user to move directly to an item on the submenu without worrying about avoiding the autohide regions.
2020-09-18Fix popup menu item selected when opening the menuPouleyKetchoupp
In order to allow selecting items by either holding left click, or click to open and click again to select, mouse button release was invalidated based on the amount of mouse motion. This was causing issues in some scenarios where an item could be selected while opening the menu if the mouse moved enough between button press and release. This case could happen in the language selection of the project manager, especially on linux, because of the order and timing of the mouse events on x11. This change invalidates mouse release based on a timing condition rather than moved distance to handle any case from the display server properly.
2020-09-09Rename ShortCut to Shortcut which is more grammatically correctHugo Locurcio
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-09-01PopupMenu rework and enhancementsEricEzaM
Many scrolling behaviour improvements and the ability to limit popup size.
2020-07-10Add override keywords.Marcel Admiraal
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-06PopupMenu.get_current_index() bound to ClassDBnobuyuki_nyuu
2020-03-26Popups have also been converted to windowsJuan Linietsky
Controls using the old modal API have been replaced to use popups.
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-10-08PopupMenu: Reorder add_* methods in more natural orderRémi Verschelde
Also adds `add_icon_radio_check_shortcut` matching `add_icon_radio_check_item`, binds them for scripting languages, and binds `add_multistate_item`.
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-05-31Improvements to incremental searchTomasz Chabora
2019-05-09Change "ID" to lowercase "id"Aaron Franke
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-07-26context menu improvementsIan
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-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