summaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2022-12-04Use system fonts as fallback and improve system font handling.bruvzg
Add support for font weight and stretch selection when using system fonts. Add function to get system fallback font from a font name, style, text, and language code. Implement system font support for Android. Use system fonts as a last resort fallback.
2022-12-02Fix missing parent class name identifier crashAdam Scott
2022-12-02C#: Always convert float Variants to System.DoubleRaul Santos
Godot floats are always 64-bit. The real_t feature only affects vectors, not scalars.
2022-12-02Merge pull request #69391 from NeilKleistGao/slnRémi Verschelde
Fix C# Solution Directory Project Settings
2022-12-02Merge pull request #69428 from neikeq/noRémi Verschelde
C#: Cleanup of Marshaling methods
2022-12-02Fix C# solution directory settingsNeilKleistGao
Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2022-12-02C#: Cleanup Variant marshaling code in source/bindings generatorsIgnacio Roldán Etcheverry
This change aims to reduce the number of places that need to be changed when adding or editing a Godot type to the bindings. Since the addition of `Variant.From<T>/As<T>` and `VariantUtils.CreateFrom<T>/ConvertTo<T>`, we can now replace a lot of the previous code in the bindings generator and the source generators that specify these conversions for each type manually. The only exceptions are the generic Godot collections (`Array<T>` and `Dictionary<TKey, TValue>`) which still use the old version, as that one cannot be matched by our new conversion methods (limitation in the language with generics, forcing us to use delegate pointers). The cleanup applies to: - Bindings generator: - `TypeInterface.cs_variant_to_managed` - `TypeInterface.cs_managed_to_variant` - Source generators: - `MarshalUtils.AppendNativeVariantToManagedExpr` - `MarshalUtils.AppendManagedToNativeVariantExpr` - `MarshalUtils.AppendVariantToManagedExpr` - `MarshalUtils.AppendManagedToVariantExpr`
2022-12-02C#: Replace most conversions between Variant and System.ObjectIgnacio Roldán Etcheverry
This commit replaces most usages of `ConvertManagedObjectToVariant` and `ConvertVariantToManagedObjectOfType`, by using the `Godot.Variant` struct instead of `System.Object`. The most notable change is to the `GetGodotPropertyDefaultValues` method that's generated for scripts. The dictionary it returns now stores `Godot.Variant` values. Remaining usages are: - The `DelegateUtils` class, for the serialization of closure display classes during assembly reloading by the editor. These display classes are compiler generated classes to store values captured by a closure. Since it's generated by the compiler, the only way we have to access the fields is through reflection. This leads to using `System.Object`. - Converting parameters when invoking constructors from the engine. This will be replaced with source generators in the future. - Legacy support for old `GetGodotPropertyDefaultValues` return values. We need to keep supporting the old version of this generated method for some time. Otherwise, if loading a project built with the previous version, it could lead to the loss of exported property values. Ideally, we should remove this legacy support before a stable release.
2022-12-02Merge pull request #69483 from akien-mga/openxr-3d-onlyRémi Verschelde
SCons: Disable openxr module with disable_3d=yes
2022-12-02Merge pull request #68870 from dsnopek/master-webxr-inputRémi Verschelde
Get WebXR fully working in Godot 4!
2022-12-02Merge pull request #69448 from BastiaanOlij/fix_etc_rgba_bgra_issueRémi Verschelde
ETCPAK expects BGRA data for ETC
2022-12-02SCons: Disable openxr module with disable_3d=yesRémi Verschelde
Fixes #69470.
2022-12-01Get WebXR fully working in Godot 4!David Snopek
2022-12-02C#: Remove `ConvertVariantToManagedObject`Ignacio Roldán Etcheverry
Its two usages were: - The Array `ICollection.CopyTo` implementation. It's possible that this class shouldn't be implementing the non-generic `ICollection`, but this commit doesn't change that. The new implementation stores the elements as boxed `Variant` values. - The `Variant.Obj` property. I'm not sure if this property's existence is justified, but for now I rewrote it as a simpler version of `ConvertVariantToManagedObject`.
2022-12-02Merge pull request #67023 from raulsntos/dotnet/fix-signal-callback-generationIgnacio Roldán Etcheverry
C#: Fix signature of generated signal callbacks
2022-12-02Merge pull request #69166 from souplamp/icon-annotation-not-workingYuri Sizov
Update docs to clarify `@icon` only works with global script classes
2022-12-01Update docs to mention `@icon` only works with global script classessouplamp
Update the docs to clarify that the `@icon` annotation does not work when only attaching a script to a node, and clarify that the script itself must be a globally accessible script type.
2022-12-01Merge pull request #69423 from KoBeWi/parentureRémi Verschelde
Improve parent signature error
2022-12-01Merge pull request #68481 from dalexeev/gds-fix-dyn-arg-def-valRémi Verschelde
GDScript 2.0: Fix shift due to skip of non-constant default argument values
2022-12-02ETCPAK expects BGRA data for ETCBastiaan Olij
2022-12-01Improve parent signature errorkobewi
2022-12-01Merge pull request #69303 from Chaosus/gds_fix_loopsRémi Verschelde
Reset unassigned local variables to null in the loops
2022-11-30Merge pull request #69392 from dsnopek/openxr-quest-fixRémi Verschelde
Fix OpenXR on the Meta Quest: XR_KHR_loader_init_android is not reported as available (but it works anyway)
2022-11-30Merge pull request #69278 from rhofour/remove-namespacesIgnacio Roldán Etcheverry
Remove unnecessary namespaces in generated PropertyDefVal files.
2022-11-30Merge pull request #69269 from red1939/red1939/masterRémi Verschelde
Acknowledge that a CLASS kind of a DataType might not have an identifier
2022-11-30Acknowledge that a CLASS kind of a DataType might not have an identifierBartosz Bielecki
2022-11-29Remove unnecessary namespaces in generated PropertyDefVal files.R. Alex Hofer
2022-11-29Fix OpenXR on the Meta Quest: XR_KHR_loader_init_android is not reported as ↵David Snopek
available (but it works anyway)
2022-11-30Merge pull request #65905 from raulsntos/dotnet/marshaling-collectionsIgnacio Roldán Etcheverry
C#: Fix marshaling generic Godot collections
2022-11-29Enable GLES3 on Androidclayjohn
Add necessary build flags and switch from using a GLES2 context to a GLES3 one. This also enables building for OpenXR Co-authored-by: m4gr3d <fhuyakou@gmail.com> Co-authored-by: dsnopek <dsnopek@gmail.com>
2022-11-29Merge pull request #68665 from TokageItLab/cut-unkeyed-gltf-animRémi Verschelde
Add "Trimming" option to cut un-keyed timeline before first key in glTF animation
2022-11-29Use forward-declarations in big editor classestrollodel
2022-11-29Add trimming option to cut un-keyed timeline before first key in gltfSilc Renew
2022-11-28Reset unassigned local variables to null in the loopsYuri Rubinsky
2022-11-28Merge pull request #69224 from adamscott/fix-PackedScene-reload_from_fileRémi Verschelde
Add `PackedScene::reload_from_file()` override
2022-11-28Add PackedScene::reload_from_file() overrideAdam Scott
2022-11-28Fix lookup code to pass functions with the same name as built-insYuri Rubinsky
2022-11-28Merge pull request #69259 from adamscott/fix-cyclic-reference-base-issueRémi Verschelde
Fix cyclic reference base being loaded but not valid (which is ok)
2022-11-28Merge pull request #69272 from rune-scape/rune-avoid-global-baseRémi Verschelde
Avoid using `get_global_class_native_base`
2022-11-28Merge pull request #67031 from raulsntos/dotnet/string-extensionsRémi Verschelde
C#: Cleanup and sync StringExtensions with core
2022-11-28Merge pull request #65907 from magian1127/4.0FixPropertiesGeneratorIgnacio Roldán Etcheverry
C#: Fix Generated ScriptProperty Error.
2022-11-27C#: Remove/deprecate unnecessary string extensionsRaul Santos
- Removed `UnicodeAt` - Removed `EndsWith` - Removed `LPad` and `RPad` - Deprecated `BeginsWith` in favor of `string.StartsWith` - Deprecated `LStrip` and `RStrip` in favor of `string.TrimStart` and `string.TrimEnd`
2022-11-27Fix cyclic reference base being loaded but not valid (which is ok)Adam Scott
2022-11-27C#: Fix Generated ScriptProperty Error.Magian
1. Add "this." to prevent errors caused by duplicate variable names. 2. Try to find the default value of property getters.
2022-11-27GDScript: Avoid using `get_global_class_native_base`rune-scape
2022-11-27Merge pull request #69194 from raulsntos/dotnet/begone-variant-disposerIgnacio Roldán Etcheverry
C#: Remove VariantSpanDisposer and use constants in stackalloc
2022-11-27C#: Remove VariantSpanDisposer and use constants in stackallocRaul Santos
- Remove `VariantSpanDisposer`, no need to dispose of the Variant Spans since we are now borrowing the Variants instead of copying them. - Remove `VariantSpanExtensions.Cleared` that was only used so the Span was initialized for `VariantSpanDisposer` to know what to dispose. - Fix stackalloc Spans to use constant VarArgsSpanThreshold and avoid bound checks.
2022-11-26Merge pull request #69191 from raulsntos/dotnet/no-throwIgnacio Roldán Etcheverry
Fix `VariantUtils.UnsupportedType` method throwing
2022-11-26Merge pull request #69088 from raulsntos/dotnet/globalIgnacio Roldán Etcheverry
C#: Add `global::` namespace to generated source
2022-11-26Fix `VariantUtils.UnsupportedType` method throwingRaul Santos
This method was not supposed to throw, just return the new constructed exception so it can be thrown by the caller.