* `_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.
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).
Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
The internal processing code only works for OS windows, since it takes
the mouse position relative to the window and not the viewport. Now we
make sure it's not called in single-window mode.
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.
This is part of ongoing work to optimize GUI and the editor.
This was caused by an incorrect calculation of the height of each item when determining the minimum size, plus a few things which were leftover after the PopupMenu rework.
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 🎆
This adds a small lag effect when opening submenus which allow the user to move directly to an item on the submenu without worrying about avoiding the autohide regions.
In order to allow selecting items by either holding left click, or click
to open and click again to select, mouse button release was invalidated
based on the amount of mouse motion.
This was causing issues in some scenarios where an item could be
selected while opening the menu if the mouse moved enough between button
press and release.
This case could happen in the language selection of the project manager,
especially on linux, because of the order and timing of the mouse
events on x11.
This change invalidates mouse release based on a timing condition rather
than moved distance to handle any case from the display server properly.