summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-12Implement cubic_interpolate() as MathFunc for refactoringSilc 'Tokage' Renew
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-11Fix Variant Ref<> assignment.reduz
-Creating from object pointer via funcptr API was missing reference initialization. -Supersedes https://github.com/godotengine/godot-cpp/pull/662 -Fixes several crashes in GDExtension
2022-02-08Merge pull request #57066 from KoBeWi/in_the_name_of_the_customRémi Verschelde
2022-02-08[GDExtension] Add binds for missing methods, operators, and constants ↵bruvzg
required for GDExtension TextServer implementation.
2022-02-07Fix script editor errors with CustomCallableskobewi
2022-02-06Fix integer vector mul/div operators and bindings.reduz
* Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively. * Create specializations to allow proper bindings. This fixes #44408 and supersedes #44441 and keeps the same rule of int <op> float returnig float, like with scalars.
2022-02-04Core: Move Vector2i to its own `vector2i.h` headerRémi Verschelde
Also reduce interdependencies and clean up a bit.
2022-02-04Core: Move Rect2i to its own `rect2i.h` headerRémi Verschelde
And take the opportunity to improve interdependencies a bit with forward declares where possible.
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-03Merge pull request #57562 from AnilBK/string-add-containsRémi Verschelde
String: Add contains().
2022-02-04String: Add contains().Anilforextra
2022-02-03[GDExtension] Fix registration of functions with enum or native pointer ↵bruvzg
return type.
2022-01-30Add support for the escaped UTF-16 and UTF-32 Unicode characters in the ↵bruvzg
scripts and expressions.
2022-01-27Merge pull request #57205 from TechnoPorg/variant-template-castRémi Verschelde
Allow method binds to take Object subclasses as arguments
2022-01-27Merge pull request #57281 from Rubonnek/rename-subsequenceRémi Verschelde
2022-01-27Expose Transform3D::sphere_interpolate_with()Max Hilbrunner
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-25Allow method binds to take Object subclasses as argumentsTechnoPorg
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object. This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary. A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-23Merge pull request #56337 from cdemirer/fix-array-dictionary-idRémi Verschelde
2022-01-22Don't sort printed Dictionarykobewi
2022-01-20Rename Variant::is_ref() to is_ref_counted()Pedro J. Estébanez
2022-01-18Merge pull request #56896 from ↵Rémi Verschelde
akien-mga/dictionary-improve-VariantWriter-and-docs
2022-01-18Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checksRémi Verschelde
2022-01-18Dictionary: Serialize empty dict as `{}` instead of `{\n}`Rémi Verschelde
Also make sure to always convert multiline dictionaries to a single line for its EditorHelp representation, as multiline values break formatting.
2022-01-17Merge pull request #55939 from cdemirer/validated-array-add-fixRémi Verschelde
Fix validated version of array addition
2022-01-18Fix validated version of array additioncdemirer
2022-01-10`Array`: Relax `slice` bound checks to properly handle negative indicesRémi Verschelde
The same is done for `Vector` (and thus `Packed*Array`). `begin` and `end` can now take any value and will be clamped to `[-size(), size()]`. Negative values are a shorthand for indexing the array from the last element upward. `end` is given a default `INT_MAX` value (which will be clamped to `size()`) so that the `end` parameter can be omitted to go from `begin` to the max size of the array. This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-06Add length and length_squared to Vector2i/3iAaron Franke
2022-01-05Merge pull request #53684 from TokageItLab/orthogonal-modeRémi Verschelde
2022-01-04Merge pull request #53313 from KoBeWi/debinded_konnektRémi Verschelde
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-30Fix Array and Dictionary id() and dictionary test bugcdemirer
2021-12-25Fix some gizmo behavior to make more consistentSilc 'Tokage' Renew
2021-12-18Fix font preview text color on light backgroundHaoyu Qiu
2021-12-16Make `--doctool` locale awareHaoyu Qiu
* Adds `indent(str)` to `String`: * Indent the (multiline) string with the given indentation. * This method is added in order to keep the translated XML correctly indented. * Moves the loading of tool/doc translation into `editor/editor_translation.{h,cpp}`. * This will be used from both `EditorSettings` and the doc tool from `main`. * Makes use of doc translation when generating XML class references, and setup the translation locale based on `-l LOCALE` CLI parameter. The XML class reference won't be translated if `-l LOCALE` parameter is not given, or when it's `-l en`.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-12-07Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusiveRémi Verschelde
2021-12-02Expose max_axis_index and max_axis_index for Vector2(i)Aaron Franke
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
2021-12-01Rename Vector parameters to be consistentRaul Santos
Renames parameters that were named differently across different scripting languages or their documentation to use the same name everywhere.
2021-11-26PackedByteArray, Array slice end exclusive, rename subarray to sliceNathan Franke
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-17Expose `randfn` to global scopeYuri Roubinsky
2021-11-16Rename built-in `SGN()` macro to `SIGN()`Hugo Locurcio
This matches the name of the GDScript function (except it's uppercase here).
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-11Merge pull request #54869 from akien-mga/string-remove-eraseRémi Verschelde
2021-11-11Color: Bind `from_hsv` as static methodRémi Verschelde
2021-11-11String: Remove `erase` method, bindings can't mutate StringRémi Verschelde