Commit graph

85 commits

Author SHA1 Message Date
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
kobewi
a913ae8d56 Add support for internal nodes 2021-08-28 02:07:23 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_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-08-23 08:10:13 -03:00
Haoyu Qiu
6ca476b406 Fix MenuButton not emitting about_to_popup signal 2021-08-16 20:53:10 +08:00
Bhuvan Vemula
a0a019a998 Added EditorCommandPalette 2021-08-09 17:41:50 +05:30
Michael Alexsander
478b6d6a13 Make switch_on_hover work on embedded windows 2021-07-26 14:45:26 -03:00
Michael Alexsander
a690cd9251 Make MenuButton's switch_on_hover work again 2021-07-22 14:27:30 -03:00
Rafał Mikrut
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Rafał Mikrut
7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
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 🎆
2021-01-01 20:19:21 +01:00
Eric M
7941235e06 Add is_valid() check for InputEventKey in CanvasItemEditor. 2020-11-23 21:52:15 +10:00
Eric M
efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Yuri Roubinsky
f2b98b4106 Remove printing of windowpos/screenpos in MenuButton 2020-10-21 09:58:37 +03:00
FIF15
0e7e25d488 Remove redundant property "enabled_focus_mode"
Fixes #41529.
2020-10-13 10:04:37 +02:00
Rémi Verschelde
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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-14 16:54:55 +02:00
Juan Linietsky
197cb4e771 Fixes to X11, still pretty broken 2020-03-26 15:50:00 +01:00
Juan Linietsky
b3080bc2f4 Popups have also been converted to windows
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +01:00
Juan Linietsky
c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky
9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Rémi Verschelde
f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Michael Alexsander Silva Dias
b8e09f98c4 Make buttons that trigger popups have the same scale 2019-04-29 13:07:47 -03:00
Rémi Verschelde
7e87a410fa
Merge pull request #28205 from mikolasan/26937-hide-popup-menu
Hide popup menu when OptionButton is hidden
2019-04-29 17:28:49 +02:00
Rémi Verschelde
cce2e4b07c
Merge pull request #22301 from YeldhamDev/button_popup_highlight
Enable toggle behaviour for buttons that trigger popups
2019-04-25 17:47:23 +02:00
Nikolay Neupokoev
ebe54833a9 Fix popup visibility for OptionButton, MenuButton and ColorPickerButton
Hide popup when its button or another parent object is hidden

Fixes #26937
2019-04-22 15:11:49 -07:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias
8f9447310d Enable toggle behaviour for buttons that trigger popups 2018-12-11 19:23:26 -02:00
Michael Alexsander Silva Dias
da7d3c5a58 Make opening menus with the same parent on mouse focus explicit 2018-11-20 20:37:45 -02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Pedro J. Estébanez
259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
Bojidar Marinov
9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00