Commit Graph

129 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
Thaddeus Crews 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 +07:00
Koyper 70e6ac5db3 Fix PopupMenu submenu item not popping on mouse enter 2025-11-18 08:34:49 +07:00
Haoyu Qiu 4694ee84f6 PopupMenu: Add theme option for merging icon and checkbox gutters 2025-11-09 13:09:14 +07:00
Michael Alexsander c5fe5d4faf
Fix `PopupMenu` losing item highlight when hovering submenus 2025-10-28 18:09:07 +07:00
chocola-mint 19c47c5d99 Remove `#include "scene/main/timer.h"` from `control.h` 2025-10-05 14:41:06 +07:00
Pāvels Nadtočajevs 2111ff0e2a
Fix menu keyboard and controller navigation. 2025-07-21 10:03:07 +07:00
Pāvels Nadtočajevs 12d957e737
Call `PopupMenu` min. size calculations after `about_to_popup` signal processing. 2025-06-11 12:23:29 +07:00
Thaddeus Crews 0d267e7b1e
Core: Add dedicated `BitField` template 2025-04-11 11:53:26 +07:00
Pāvels Nadtočajevs b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +07:00
Haoyu Qiu 82a0290871 Add auto translate mode for items in PopupMenu and OptionButton 2025-03-09 23:50:11 +07:00
Thaddeus Crews 324512e11c
Style: Replace header guards with `#pragma once` 2025-03-07 17:33:47 +07:00
Pāvels Nadtočajevs 4b8cfc3040 Fix native popup menus position in embedded windows. 2025-02-01 21:31:03 +07:00
Michael Alexsander 5c63646e87
Change print warnings to config ones for popups that need transparency 2025-01-09 15:59:56 +07:00
Michael Alexsander f7f6432af6
Make `PopupMenu/Panel` shadows properly visible again 2024-12-02 14:20:58 +07:00
rune-scape d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 +07:00
kit 307e40e873 Clean up Viewport forced_mouse_focus 2024-08-21 09:37:44 +07:00
bruvzg eddc9cea11
[NativeMenu] Do not auto toggle check/multi-state items. Add `is_native_menu` method. 2024-07-08 11:20:28 +07:00
kobewi b365a63403 Automatically use property count in PropertyListHelper 2024-05-25 10:51:37 +07:00
kobewi e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +07:00
bruvzg ac7583e449
[NativeMenu] Implement native popup menu support on Windows. 2024-03-13 10:51:38 +07:00
bruvzg c65a667924
Move `global_menu_*` methods to a separate `NativeMenu` class. 2024-03-04 23:41:41 +07:00
Mounir Tohami 7884d63281 Fix PopupMenu doesn't respect it's ScrollContainer's margins 2024-02-23 15:51:47 +07:00
kobewi aeec3c1309 Add methods to add submenus without using names 2024-02-22 15:13:53 +07:00
Rémi Verschelde 8f1915eb90
Revert "Fix selecting popup menu items on mouse release" 2024-02-20 10:05:41 +07:00
Rémi Verschelde 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 +07:00
kobewi 4f29ef82db Add PropertyListHelper to PopupMenu 2024-02-11 12:09:55 +07:00
mrcdk c9bdccf7f2 Expose PopupMenu get_item_multistate(), get_item_multistate_max() and set_item_multistate_max() 2024-01-22 20:07:19 +07:00
Robert Yevdokimov 06c2cda848 Fix selecting popup menu items on mouse release 2024-01-14 17:45:52 +07:00
bruvzg 15cdc52658
[PopupMenu] Handle physical_keycode and key_label of shortcuts. 2023-12-30 13:17:46 +07:00
Yuri Sizov 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 +07:00
bruvzg 0d44b50520
[macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +07:00
Markus Sauermann 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 +07:00
bruvzg 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 +07:00
kobewi df24882f9a Free submenu children when clearing PopupMenu 2023-09-25 16:45:41 +07:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +07:00
Tomasz Chabora 3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +07:00
bruvzg 4790da7900
[macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +07:00
Florian Kothmeier c33748d954 Fix invalid minimum size for translated messages in option button 2023-06-29 15:01:36 +07:00
Markus Sauermann 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 +07:00
Rémi Verschelde f00c971b81
Merge pull request #63168 from Levrault/master
Fix: InputEventJoypadMotion should trigger only once on a vslider
2023-06-05 18:04:39 +07:00
Luc-Frédéric Langis 166ca77f20 feat(gamepad): improve gamepad behavior with slider and popup_menu 2023-06-05 10:20:46 +07:00
Ninni Pipping 44a5b710f5 Unify item indexing in `PopupMenu` 2023-05-24 15:58:50 +07:00
the-sink a85eef4367 Add icon_modulate functionality to PopupMenu 2023-05-08 15:25:00 +07:00
Yuri Sizov 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 +07:00
Juan Linietsky 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 +07:00
Juan Linietsky 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 +07:00
Rémi Verschelde 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 +07:00
Eric M af438ae742 Ensure popup menu redraws items when shortcuts update. 2022-09-26 23:21:32 +07:00
Michael Alexsander 9507e91c07 Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()` 2022-09-06 10:51:14 +07:00
Yuri Sizov 15fd025f90 Add dumb and manual theme caching systems to Window 2022-09-01 16:05:02 +07:00