Commit Graph

131 Commits

Author SHA1 Message Date
5afc01c46d Merge pull request #112604 from bruvzg/pop_center_rec
Update rect after `_pre_popup` in `popup_centered_*`.
2025-11-25 09:52:38 -06:00
1e1f044fd1 Merge pull request #110256 from Koyper/fix_popup_menu_item_wont_open
[PopupMenu] Fix submenu item not popping on mouse enter
2025-11-18 14:00:45 -06:00
70e6ac5db3 Fix PopupMenu submenu item not popping on mouse enter 2025-11-18 08:34:49 -06:00
adf18ff44d Update rect after _pre_popup in popup_centered_*. 2025-11-10 11:24:37 +02:00
4694ee84f6 PopupMenu: Add theme option for merging icon and checkbox gutters 2025-11-09 13:09:14 +08:00
c5fe5d4faf Fix PopupMenu losing item highlight when hovering submenus 2025-10-28 18:09:07 -03:00
19c47c5d99 Remove #include "scene/main/timer.h" from control.h 2025-10-05 14:41:06 +09:00
2111ff0e2a Fix menu keyboard and controller navigation. 2025-07-21 10:03:07 +03:00
12d957e737 Call PopupMenu min. size calculations after about_to_popup signal processing. 2025-06-11 12:23:29 +03:00
0d267e7b1e Core: Add dedicated BitField template 2025-04-11 11:53:26 -05:00
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
82a0290871 Add auto translate mode for items in PopupMenu and OptionButton 2025-03-09 23:50:11 +08:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
4b8cfc3040 Fix native popup menus position in embedded windows. 2025-02-01 21:31:03 +02:00
5c63646e87 Change print warnings to config ones for popups that need transparency 2025-01-09 15:59:56 -03:00
f7f6432af6 Make PopupMenu/Panel shadows properly visible again 2024-12-02 14:20:58 -03:00
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
kit
307e40e873 Clean up Viewport forced_mouse_focus 2024-08-21 09:37:44 -04:00
eddc9cea11 [NativeMenu] Do not auto toggle check/multi-state items. Add is_native_menu method. 2024-07-08 11:20:28 +03:00
b365a63403 Automatically use property count in PropertyListHelper 2024-05-25 10:51:37 +02:00
e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +02:00
ac7583e449 [NativeMenu] Implement native popup menu support on Windows. 2024-03-13 10:51:38 +02:00
c65a667924 Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
7884d63281 Fix PopupMenu doesn't respect it's ScrollContainer's margins 2024-02-23 15:51:47 +02:00
aeec3c1309 Add methods to add submenus without using names 2024-02-22 15:13:53 +01:00
8f1915eb90 Revert "Fix selecting popup menu items on mouse release" 2024-02-20 10:05:41 +01:00
92951b0295 Merge pull request #86952 from ryevdokimov/fix-selecting-popup-menu-items-on-mouse-release
Fix selecting popup menu items on mouse release
2024-02-14 10:59:40 +01:00
4f29ef82db Add PropertyListHelper to PopupMenu 2024-02-11 12:09:55 +01:00
c9bdccf7f2 Expose PopupMenu get_item_multistate(), get_item_multistate_max() and set_item_multistate_max() 2024-01-22 20:07:19 +01:00
06c2cda848 Fix selecting popup menu items on mouse release 2024-01-14 17:45:52 -05:00
15cdc52658 [PopupMenu] Handle physical_keycode and key_label of shortcuts. 2023-12-30 13:17:46 +02:00
8a9aa30348 Merge pull request #81243 from Sauermann/fix-window-events
Fix internal events not being delivered to some Window types
2023-12-19 13:01:00 +01:00
0d44b50520 [macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +02:00
fa02d19fd1 Fix internal events not being delivered to some Window types
`AcceptDialog`, `Popup` and `PopupMenu` no longer subscribe to
"window_input" signal, because that is only sent if it is not an
internal signal.

Instead they receive events in `_input_from_window`. They ensure that
the event is also propagated to their super-function, just like
previously the signals would be treated.
2023-11-14 20:29:17 +01:00
d1aaa914f3 [macOS] Add about_to_open and popup_hide callback for the global menus, move part of logic to the PopupMenu to allow live menu modification. 2023-10-04 09:49:51 +03:00
df24882f9a Free submenu children when clearing PopupMenu 2023-09-25 16:45:41 +02:00
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +02:00
4790da7900 [macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +03:00
c33748d954 Fix invalid minimum size for translated messages in option button 2023-06-29 15:01:36 +02:00
840e2b14f3 Remove unused variable PopupMenu::parent_rect
This private variable is not read anywhere.
Remove it and all places, where it is set.
2023-06-15 12:08:47 +02:00
f00c971b81 Merge pull request #63168 from Levrault/master
Fix: InputEventJoypadMotion should trigger only once on a vslider
2023-06-05 18:04:39 +02:00
166ca77f20 feat(gamepad): improve gamepad behavior with slider and popup_menu 2023-06-05 10:20:46 -04:00
44a5b710f5 Unify item indexing in PopupMenu 2023-05-24 15:58:50 +02:00
a85eef4367 Add icon_modulate functionality to PopupMenu 2023-05-08 15:25:00 -07:00
1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
0e0a6bb39b Removed unused property hints and Object::get_translatable_strings()
* 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-09 16:56:01 +01:00
2b815df3c1 Use BitField<> in core type masks
* 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-08 22:17:40 +01:00
d95794ec8a One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
af438ae742 Ensure popup menu redraws items when shortcuts update. 2022-09-26 23:21:32 +10:00