1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00
Commit Graph

119 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs
90370a08ec Clamp menus at the bottom of the screen. 2025-08-27 15:29:50 +03:00
Pāvels Nadtočajevs
34a97f9c9b Fix scale and position of popups with force_native. 2025-06-16 13:03:42 +03:00
Rémi Verschelde
68349be895 Merge pull request #106813 from bruvzg/tr_noti
Add missing `TRANSLATION_CHANGED` notifications.
2025-06-10 12:30:01 +02:00
Michael Alexsander
454e4f817c Make build profile project detection also set build options 2025-06-03 11:11:33 -03:00
Pāvels Nadtočajevs
1d33693e0d Add missing TRANSLATION_CHANGED notifications. 2025-05-26 07:52:07 +03:00
Pāvels Nadtočajevs
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
Michael Alexsander
5c63646e87 Change print warnings to config ones for popups that need transparency 2025-01-09 15:59:56 -03:00
Yufeng Ying
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
Markus Sauermann
9c5886f95a Fix switch_on_hover for MenuButton
Previously, embedded Windows (the opened menu) were not accounted for
when checking for `switch_on_hover`.

`gui_get_hovered_control()` is more appropriate to check for the hover
status of other `MenuButton` nodes at the mouse position.

Explain the usage of the incorrectly used function in a comment.
2024-12-16 22:11:42 +01:00
A Thousand Ships
2d2fb3f2e7 Treat MenuBar and MenuButton as advanced UI 2024-08-28 14:26:54 +02:00
kobewi
5279fec60f Always store ID of PopupMenu items 2024-08-20 15:33:21 +02:00
A Thousand Ships
832695eb2c [Tests] Fix various unit tests on minimal builds 2024-07-18 15:17:28 +02:00
Yuri Rubinsky
af5fc8354b Fix a bunch of orphan StringName errors at ProjectSettings/Editor exit 2024-07-09 19:38:52 +03:00
Gilles Roudière
7705265477 Fix PropertyListHelper::_get_property returning a valid value even if an index is outside the array valid indices
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-05-10 10:46:04 +02:00
kobewi
e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +02:00
Michael Alexsander
7b42c24550 Make auto translation inheritable 2024-02-15 16:51:19 -03:00
Emmanouil Papadeas
e864b26e54 Fix MenuBar hover position scaling properly with the scale factor multiplier 2024-01-24 15:22:16 +02:00
Tomasz Chabora
3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +02:00
Markus Sauermann
d41665eb5e Fix position and size of MenuButton popup
Use the same logic as in OptionButton::show_popup
2023-06-15 15:29:50 +02: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 +02:00
Haoyu Qiu
150f89352b Auto translate popup menus of MenuButton and OptionButton
Currently, `auto_translate` property of a `MenuButton` or `OptionButton`
won't affect its popup menu. It's okay if you want to auto translate,
but requires extra setup if you don't.
2023-03-27 18:09:24 +08: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 +01:00
Eric M
a3ed9e6f2c Move Shortcut Context to Control and ensure that shortcut_input adheres to contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context. 2022-10-13 21:07:19 +10:00
bruvzg
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
EricEzaM
272c297931 Improve MenuButton and OptionButton
* MenuButton + OptionButton: Add method `show_popup()` which performs required popup setup before showing (prefer use of this over `get_popup()->popup()`, otherwise GH #66308 occurs)
* MenuButton: Ensure that the menu can be opened with a shortcut, if one is set for the button. (GH #66403). Ensure that popupmenu item shortcuts are checked first before the MenuButton shortcut.
2022-10-03 20:07:39 +10:00
Michael Alexsander
9507e91c07 Rename PopupMenu's set/get_current_index() to set/get_focused_item() 2022-09-06 10:51:14 -03:00
Michael Alexsander
221344b9e2 Fix some corner cases in the Menu/OptionButton item auto-highlight 2022-08-28 01:15:03 -03:00
Rémi Verschelde
ac7b5111f5 Merge pull request #64768 from bruvzg/popups_hide_if_visible 2022-08-26 11:59:50 +02:00
Rémi Verschelde
b7d2ba12c8 Merge pull request #64635 from YeldhamDev/menu_buttons_popup_fix
Make `Menu/OptionButton` item auto-highlight behave better
2022-08-24 19:07:25 +02:00
风青山
e561c68256 Add 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-23 23:25:22 +08:00
bruvzg
cd095ab64a Hide MenuButton / OptionButton popup on click if it's already visible. 2022-08-23 10:38:51 +03:00
Michael Alexsander
1da50698fc Make Menu/OptionButton item auto-highlight behave better 2022-08-19 14:54:53 -03:00
bruvzg
8c56a7416b Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
FireForge
88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 -05:00
bruvzg
d1207a0504 [Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Hugo Locurcio
be5116c4a4 Fix typo in BaseButton shortcut context methods 2022-03-07 22:36:12 +01:00
Hugo Locurcio
a06f82ca4d Add optional constructor arguments to more Control nodes
This can be used to make editor code more compact.
However, as of writing, these constructor arguments cannot be used
from the scripting API.

This was already provided for Label and CheckBox, but it was missing
for other Control nodes where it made sense to provide a default value.
2022-03-04 09:48:41 +01:00
Rémi Verschelde
0f5455230c Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
Michael Alexsander
8bde86da10 Make popups from MenuButton, OptionButton, and submenus obey the layout direction 2022-02-06 23:07:08 -03:00
Michael Alexsander
73c225838f Make popup menus focus items automatically when not using the mouse 2022-01-25 13:51:56 -03:00
Rémi Verschelde
cb7daddbeb Merge pull request #54647 from rafallus/fix/popupmenu_ids
Fix `PopupMenu` items id range in inspector
2022-01-08 11:39:09 +01:00
rafallus
38d578e24e Fix PopupMenu items id range in inspector 2022-01-07 19:58:09 -06:00
Rémi Verschelde
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Aaron Franke
6eb7179f1c Rename "items_count" property to "item_count" 2021-12-06 22:02:27 -06:00
Rémi Verschelde
3abb5a9035 Add missing argument names for bindings in GDExtension 2021-11-04 15:27:23 +01:00
rafallus
4554892223 Implement inspector property array for PopupMenu and MenuButton 2021-11-03 09:32:29 -06:00
bruvzg
99dc2ec9e1 Fix RTL layout Label text, VBox child, 3D node editor controls, and popup menu alignment. 2021-09-21 10:35:23 +03:00
Rémi Verschelde
b334560f05 Merge pull request #49376 from menip/OptionButtonFix 2021-09-17 16:00:42 +02:00
menip
4f4c9a5f57 Make Color Picker, Menu Button, Option Button consider camera position scale for popup position. 2021-08-30 08:42:33 -07:00