Commit graph

54140 commits

Author SHA1 Message Date
Rémi Verschelde
b0f49266f9
Merge pull request #76719 from m4gr3d/add_input_event_cancelled_state_main
Augment the `InputEvent` class with a `CANCELED` state
2023-05-17 11:25:21 +02:00
Rémi Verschelde
019fef758f
Merge pull request #75958 from Rindbee/update_size_cache_in_Button
Update size or size cache when toggling `expand_icon` in `Button`
2023-05-17 11:25:16 +02:00
Rémi Verschelde
56fc6316b7
Merge pull request #64789 from derammo/derammo_const_ref
Change Ref<T> to allow non const access to ptr
2023-05-17 11:25:13 +02:00
Rémi Verschelde
411b6a95a0
Merge pull request #52314 from lawnjelly/four_delta_smooth
Add frame delta smoothing option (4.x)
2023-05-17 11:25:03 +02:00
Rémi Verschelde
c97ead988a
Merge pull request #77137 from RedworkDE/gdextension-interface-compress
Compress embedded GDExtension interface
2023-05-17 11:24:56 +02:00
Rindbee
9bd1d3b5c8 Update size or size cache when toggling expand_icon in Button
When the `expand_icon` is switched, the size cache can be updated to
solve the issue that the cache cannot be updated when the `OptionButton`
is enabled with `fit_to_longest_item`.
2023-05-17 06:06:25 +08:00
RedworkDE
110bc5058d Compress embedded GDExtension interface 2023-05-16 22:16:45 +02:00
Rémi Verschelde
a8453cb333
Merge pull request #76406 from dsnopek/gdextension-interface
Rework GDExtension interface from a struct to loading function pointers
2023-05-16 19:23:01 +02:00
David Snopek
9b9482d4bb Rework GDExtension interface from a struct to loading function pointers 2023-05-16 10:27:46 -05:00
lawnjelly
7925670f81 Add frame delta smoothing option (4.x)
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.

The delta_smooth_enabled setting can also be modified at runtime through OS::, and there is also now a command line setting to override the project setting.
2023-05-16 13:57:25 +01:00
Rémi Verschelde
755c61b57a
Merge pull request #77064 from brno32/push-input-null-check
Check for null event in Viewport::push_input
2023-05-16 11:04:08 +02:00
Rémi Verschelde
557fa5c31a
Merge pull request #77081 from KoBeWi/yo_dawg_I_heard_you_like_projects,_so_I_put_a_project_in_your_project
Print a warning when a nested project is detected
2023-05-16 11:01:55 +02:00
Rémi Verschelde
965db42911
Merge pull request #77080 from KoBeWi/spam_error_log_with_multiple_threads_for_better_spam_efficiency
Allow showing messages from threads in Editor Log
2023-05-16 11:01:32 +02:00
Rémi Verschelde
accb57d50f
Merge pull request #77036 from bonjorno7/ok-color-static
Make ok_color functions static
2023-05-16 11:01:08 +02:00
Rémi Verschelde
12b7a56202
Merge pull request #76713 from KoBeWi/TODO_is_now
Fix 2D audio in multiple viewports
2023-05-16 11:00:45 +02:00
Rémi Verschelde
f868b4781b
Merge pull request #76684 from KoBeWi/this_branch_is_meta
Add background panel to new meta dialog
2023-05-16 11:00:21 +02:00
Rémi Verschelde
d61827af05
Merge pull request #76605 from Rindbee/fix_get_visible_line_count
Fix calculation bug with `TextEdit::get_line_height()`
2023-05-16 10:59:52 +02:00
Rémi Verschelde
508a5bf16e
Merge pull request #76025 from YuriSizov/editor-reparentable-windows
Expose dialog parent-and-popup logic to the API
2023-05-16 10:49:09 +02:00
Rémi Verschelde
59c19a7172
Merge pull request #75250 from bruvzg/lbl_rtl_jst_flags
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification.
2023-05-16 10:48:45 +02:00
Rémi Verschelde
265c70a369
Merge pull request #75142 from bruvzg/scr
[DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows.
2023-05-16 10:48:16 +02:00
Rémi Verschelde
8cfa19a078
Merge pull request #77000 from reduz/make-more-base-nodes-thread-safe
Make more base nodes thread safe
2023-05-16 00:31:56 +02:00
Rémi Verschelde
313f613352
Merge pull request #35813 from touilleMan/ptrcall-ret-value-no-initialize
Improve GDExtension user-friendliness by being more explicit on when return value should be passed initialized
2023-05-16 00:31:22 +02:00
Fredia Huya-Kouadio
250749fa79 Augment the InputEvent class with a CANCELED state
The `InputEvent` class currently supports the `pressed` and `released` states, which given the binary nature, is represented by a `bool` field.
This commit introduced the `CANCELED` state, which signals that an ongoing input event has been canceled.
To represent all the states, the `InputEventState` enum is added and the `InputEvent` logic is refactored accordingly.
2023-05-15 11:48:25 -07:00
Alex Drozd
a5a1c3a03c check for null event in Viewport::push_input 2023-05-15 20:16:15 +02:00
Yuri Sizov
17f492fb82 Expose dialog parent-and-popup logic to the API 2023-05-15 19:49:28 +02:00
bruvzg
9163d8c336
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification. 2023-05-15 19:23:54 +03:00
Emmanuel Leblond
e785dd9dd9
Improve user-friendliness of "return value as function param" pattern in GDExtension API
This commit introduce separate types (e.g. GDNativeStringPtr vs GDNativeUninitializedStringPtr)
depending on if the pointed data is already initialized (C++ style where constructor is alway
called when create a variable even if it is to be passed as return value) or not (C style).
On top of that, small changes has been made to `GDNativeInterface` so that it methods are
consistent on using uninitialized return value.
2023-05-15 17:14:57 +02:00
Juan Linietsky
0a9f72d5a8 Make more base nodes thread safe
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +02:00
Rémi Verschelde
5c653c27cd
Merge pull request #77093 from RandomShaper/fix_mq_copy
Fix transfer of messages between queues
2023-05-15 13:47:18 +02:00
Rémi Verschelde
5adac3c680
Merge pull request #77091 from dalexeev/gds-fix-validate-call-arg
GDScript: Fix `validate_call_arg()` for unresolved datatype
2023-05-15 13:46:54 +02:00
Rémi Verschelde
b497729c92
Merge pull request #77074 from spanzeri/fix-theme-crash-skeleton-editor
Fix Skeleton3D editor crash regression after #76592
2023-05-15 13:46:30 +02:00
Rémi Verschelde
7866050e36
Merge pull request #77063 from Faless/crypto/i_trusted_win_trusted_root_cas_were_trusted
[TLS/Windows] Skip disallowed certs in the trusted CA list.
2023-05-15 13:46:07 +02:00
Rémi Verschelde
7349789a48
Merge pull request #77061 from AThousandShips/placeholder_doc
Document limitations of placeholder textures
2023-05-15 13:45:43 +02:00
Rémi Verschelde
f57fcc95f0
Merge pull request #77056 from kleonc/property_usage_description_fix_network_is_gone
Fix property usage docs referring to removed network flag
2023-05-15 13:45:20 +02:00
Rémi Verschelde
f5d8a72e6d
Merge pull request #77034 from kleonc/spriteframes-editor-toolbar-flowcontainer
Make SpriteFrames editor toolbar a `FlowContainer`
2023-05-15 13:44:56 +02:00
Rémi Verschelde
9853da4bfe
Merge pull request #77009 from jpcerrone/fix_errors_while_reordering_input_maps
Fix errors that appear while reordering input map entries
2023-05-15 13:44:33 +02:00
Rémi Verschelde
591115dcde
Merge pull request #76989 from dalexeev/fix-draw-multiline-colors-usage
Fix `draw_multiline_colors` usage
2023-05-15 13:44:09 +02:00
Rémi Verschelde
70dcfdab1f
Merge pull request #76446 from reduz/add-gdextension-api-compatibility
Add a backwards-compatibility system for GDExtension
2023-05-15 13:43:46 +02:00
Rémi Verschelde
88f5b8d687
Merge pull request #74190 from TokageItLab/respect-fade-abort-oneshot
Fix NodeOneShot doesn't respect fade-out when aborting and improvement
2023-05-15 13:43:20 +02:00
Rémi Verschelde
1d83a4c5a5
Merge pull request #72249 from RandomShaper/robust_sync
Robustify multi-threading primitives
2023-05-15 13:42:52 +02:00
Samuele Panzeri
a103cd76bb Fix skeleton 3d editor crash in RC3
Control notifies a theme changed before the editor has entered the tree
2023-05-15 12:12:48 +02:00
Juan Linietsky
d8078d3f4c Add a backwards-compatibility system for GDExtension method
This adds a way to ensure that methods that were modified in the Godot API will continue working in older builds of GDExtension even if the new signature is different.

```C++
// New version (changed)
ClassDB::bind_method(D_METHOD("add_sphere","radius","position"),&MyShapes::add_sphere);
// Compatibility version (still available to extensions).
ClassDB::bind_compatibility_method(D_METHOD("add_sphere","radius"),&MyShapes::_compat_add_sphere);
```

**Q**: If I add an extra argument and provide a default value (hence can still be called the same), do I still have to provide the compatibility version?
**A**: Yes, you must still provide a compatibility method. Most language bindings use the raw method pointer to do the call and process the default parameters in the binding language, hence if the actual method signature changes it will no longer work.

**Q**: If I removed a method, can I still bind a compatibility version even though the main method no longer exists?
**A**: Yes, for methods that were removed or renamed, compatibility versions can still be provided.

**Q**: Would it be possible to automate checking that methods were removed by mistake?
**A**: Yes, as part of a future PR, the idea is to add a a command line option to Godot that can be run like : `$ godot --test-api-compatibility older_api_dump.json`, which will also be integrated to the CI runs.
2023-05-15 12:05:40 +02:00
Pedro J. Estébanez
93de52942a Fix transfer of messages between queues 2023-05-15 11:51:58 +02:00
Silc Lizard (Tokage) Renew
238bc9fe1f Fix NodeOneShot doesn't respect fade-out when aborting and improvement 2023-05-15 18:51:45 +09:00
Danil Alexeev
7da3110e6b
GDScript: Fix validate_call_arg() for unresolved datatype 2023-05-15 12:13:52 +03:00
Rémi Verschelde
78f9da7a9f
Merge pull request #76887 from RedworkDE/ci-fix-windows-unit-tests
CI: Fix running the unit tests on windows
2023-05-15 10:57:04 +02:00
Yuri Rubinsky
d7211b371c
Merge pull request #77086 from Chaosus/shaders_fix_render_mode_completion 2023-05-15 10:58:23 +03:00
Rémi Verschelde
37fd9a32f3
Merge pull request #77065 from FranckRJ/fix-capsuleshape2d-getrect
Fixed width of CapsuleShape2D::get_rect + set center to center of shape
2023-05-15 09:35:23 +02:00
Rémi Verschelde
e2f27a2248
Merge pull request #77042 from dioptryk/obj-vertex-colors-master
Add support for non-standard OBJ vertex entries
2023-05-15 09:34:59 +02:00
Rémi Verschelde
716f788b98
Merge pull request #77033 from dalexeev/editor-help-fix-array-links
EditorHelp: Fix displaying typed `Array` links
2023-05-15 09:34:35 +02:00