summaryrefslogtreecommitdiff
path: root/scene/gui/popup_menu.cpp
AgeCommit message (Collapse)Author
2023-02-01[X11] Fix IME subwindow in the popup not getting input focus.bruvzg
2023-01-19Clean-up, harmonize, and improve StyleBox APIYuri Sizov
- Make all margin properties follow the same naming convention (their getter and setter too). - Remove a virtual counterpart of `get_style_margin` from API. - Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
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-12-07Fix menu popup safe rect height no including theme separation.bruvzg
2022-11-14Remove redundant Variant-types initializationsMarkus Sauermann
2022-11-08Remove duplicate project settings definitionskobewi
2022-10-13Merge pull request #66337 from EricEzaM/sprite-framesRémi Verschelde
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-26Ensure popup menu redraws items when shortcuts update.Eric M
2022-09-24Ensure all checks of `is_action` in the editor which are for 'shortcut' use, ↵Eric M
check the action exactly.
2022-09-06Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()`Michael Alexsander
2022-09-02Add `is_zero_approx` methods to `Vector2`, `3`, and `4`Jonathan Nicholl
2022-09-01Add dumb and manual theme caching systems to WindowYuri Sizov
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29Merge pull request #64960 from YeldhamDev/more_hl_stuffRémi Verschelde
2022-08-28Fix some corner cases in the `Menu/OptionButton` item auto-highlightMichael Alexsander
2022-08-27Fix crash when pressing up on an empty `PopupMenu`Michael Alexsander
2022-08-23Add some codes, returnes directly if the value is not changed.风青山
Avoid executing the following value-changed logics if the value does not really change.
2022-08-18Implement `MenuBar` control to wrap `PopupMenu`s or native menu, use native ↵bruvzg
menu for editor.
2022-08-11Add missing properties to default themekobewi
2022-07-18Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge
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-06-11Add suffixes to all nodes and resourcesFireForge
2022-04-28Merge pull request #52624 from e8newallm/52577Rémi Verschelde
Corrected ordering of Left/Top/Right/Bottom properties
2022-04-23Rename theme properties to include underscoresFireForge
- check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
2022-04-13Add `font_separator` and related properties to `PopupMenu`Michael Alexsander
2022-04-13Fix and tweak labeled separator in `PopupMenu`Michael Alexsander
2022-04-13Fix sub-menu keyboard navigation.bruvzg
2022-03-15Fix text buf does not clear when calling the method set_item_text in PopupMenu风青山
2022-03-12Allow negative indexes in ItemList and PopupMenukobewi
2022-03-06Remove set_as_minsize()kobewi
2022-02-25Improve popup window handling.bruvzg
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-09Merge pull request #57837 from YeldhamDev/that_was_pointlessRémi Verschelde
2022-02-09Remove code to update the layout direction of submenus from `PopupMenu`Michael Alexsander
2022-02-09Adjust id creation in PopupMenu to avoid duplicate idsMarkus Sauermann
2022-02-08Merge pull request #57692 from YeldhamDev/popping_optionsRémi Verschelde
2022-02-08Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
2022-02-07Merge pull request #57725 from jmb462/missing-sname-theme-settersRémi Verschelde
2022-02-06Make popups from `MenuButton`, `OptionButton`, and submenus obey the layout ↵Michael Alexsander
direction
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-02-06Better handle icons and checkboxes with separators in `PopupMenu`Michael Alexsander
2022-02-06Enhancements and fixes for `OptionButton` and `PopupMenu`Michael Alexsander
2022-02-03Merge pull request #56992 from YeldhamDev/smarter_popmenu_focusRémi Verschelde
2022-01-28Make various improvements to OptionButtoneikobear
- Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor. - Reset OptionButton selection to -1 when the selected item has been removed. - Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.