A Thousand Ships
7726ed6740
Fix errors when testing `Resource`
...
Replaces `get_meta` with `has_meta` for cases where the meta is expected
to be empty.
2023-09-09 08:20:05 +02:00
Aaron Franke
22e2696767
Add unit tests for type_convert Variant utility function
2023-09-08 10:13:22 -05:00
Rémi Verschelde
11518665b7
Codestyle: Don't use auto where not warranted
...
We allow using auto for lambdas or complex macros where a return type
may change based on the parameters. But where the type is clear, we
should be explicit.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-09-07 16:15:18 +02:00
Rémi Verschelde
d013fc3f03
Merge pull request #81304 from ajreckof/Change-precedence-in-rules-to-make-location-after-proper-casing-
...
Change precedence in rules to make location after proper casing.
2023-09-07 13:52:08 +02:00
Yuri Sizov
58126e479c
Introduce the concept of global theme contexts
...
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.
It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.
Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +02:00
ajreckof
19632eaf50
Change precedence in rules to make location after proper casing.
2023-09-05 16:16:21 +02:00
Yuri Sizov
95b00b11b0
Merge pull request #81328 from bruvzg/str_minus_zero
...
[String] Fix string conversion for -0.0 float values.
2023-09-05 15:14:36 +02:00
Yuri Sizov
14cfed57b5
Merge pull request #81326 from bruvzg/font_update
...
Update and properly list versions of the built-in fonts.
2023-09-05 15:14:30 +02:00
bruvzg
2b3bbde6da
[String] Fix string conversion for -0.0 float values.
2023-09-05 11:32:55 +03:00
bruvzg
ab33613a13
Update and properly list versions of the built-in fonts.
2023-09-05 08:17:24 +03:00
Yuri Sizov
4328ffcc79
Fix ThemeDB initialization in tests
...
Also fixes class name shadowing in Viewport/Window tests.
2023-09-04 18:07:16 +02:00
Jcrespo
528a76486c
Add inverse hyperbolic functions `asinh()`, `acosh()` & `atanh()`
...
GDScript has the following built-in trigonometry functions:
- `sin()`
- `cos()`
- `tan()`
- `asin()`
- `acos()`
- `atan()`
- `atan()`
- `sinh()`
- `cosh()`
- `tanh()`
However, it lacks the hyperbolic arc (also known as inverse
hyperbolic) functions:
- `asinh()`
- `acosh()`
- `atanh()`
Implement them by just exposing the C++ Math library, but clamping
its values to the closest real defined value.
For the cosine, clamp input values lower than 1 to 1.
In the case of the tangent, where the limit value is infinite,
clamp it to -inf or +inf.
References #78377
Fixes godotengine/godot-proposals#7110
2023-09-01 01:27:56 +02:00
Rémi Verschelde
8edc0b43b9
Merge pull request #78634 from Sauermann/fix-notification-order
...
Fix `Object::notification` order
2023-08-30 08:44:36 +02:00
Markus Sauermann
c4705a590b
Fix Object::notification order
...
Previously the `p_reversed` parameter didn't influence the order
in a correct way.
Also script overridden _notification functions were not called in
the correct order.
To fix this some `notification` functions had to add a `p_reversed`
parameter.
This made it necessary to adjust cpp-bindings.
Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-08-30 00:15:55 +02:00
clayjohn
0045dc204c
Revert "Implement loading DDS textures at run-time"
...
This reverts commit 34ab1c8a36
.
2023-08-29 14:25:16 +02:00
kobewi
67db4693eb
Expose _validate_property() for scripting
2023-08-28 15:18:48 +02:00
Rémi Verschelde
75bc6866a4
Merge pull request #81037 from AThousandShips/openxr_register
...
Ensure OpenXR classes are declared properly
2023-08-28 12:09:47 +02:00
Rémi Verschelde
2c0a74a149
Merge pull request #80105 from Sauermann/fix-global-transform
...
Fix global transform validity for `Node2D` and `Control`
2023-08-28 12:03:53 +02:00
A Thousand Ships
c23bd8b143
Ensure OpenXR classes are declared properly
...
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2023-08-28 09:37:04 +02:00
Pawel Lampe
0954ed0283
Suppress expected errors in navi-related unit tests, #80616
2023-08-22 19:33:38 +02:00
Septian
a31120b6f6
Improve PackedScene unit test by covering more methods
2023-08-20 20:56:27 +07:00
bruvzg
07d859de25
[TextServer] Fix issues with character breaks, add more tests.
2023-08-19 11:49:34 +03:00
Rémi Verschelde
b51ee8b029
Merge pull request #80650 from bruvzg/comp_char_fix
...
[TextServer] Fix system font fallback and caret/selection behavior for composite characters.
2023-08-18 17:24:54 +02:00
Rémi Verschelde
c3fd8752d2
Merge pull request #80612 from akien-mga/scons-disable-exception-handling
...
SCons: Disable C++ exception handling
2023-08-16 16:56:07 +02:00
Rémi Verschelde
20e24bd2bb
Merge pull request #78529 from Chaosus/string_reverse
...
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
Rémi Verschelde
3907e53ff6
SCons: Disable C++ exception handling
...
Upon investigating the extremely slow MSVC build times in #80513 , I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.
This is wasteful on multiple aspects:
- Binary size: Around 20% binary size reduction with exceptions disabled
for both MSVC and GCC binaries.
- Compile time:
* More than 50% build time reduction with MSVC.
* 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.
Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
2023-08-16 10:23:34 +02:00
Rémi Verschelde
a7dc4c22a9
Merge pull request #80334 from Sauermann/fix-window-out-of-viewport-events
...
Fix nodes receiving mouse events in black bars of `Window`
2023-08-16 09:12:42 +02:00
bruvzg
5d3fcc5766
[TextServer] Fix system font fallback and caret/selection behavior for composite characters.
2023-08-15 11:42:40 +03:00
Rémi Verschelde
efdff9cbc2
Fix GCC -Wmaybe-uninitialized warnings
2023-08-14 14:35:35 +02:00
Rémi Verschelde
8dabb4c80d
Merge pull request #80423 from sepTN/test-packed-scene-v2
...
Improve PackedScene unit test for complex scene
2023-08-10 14:54:22 +02:00
Rémi Verschelde
b78d52b693
Merge pull request #75694 from YuriSizov/editor-hot-singleton-interfaces-in-your-area
...
Make `EditorInterface` accessible as a singleton
2023-08-10 14:53:35 +02:00
Yuri Sizov
951ea2415b
Make EditorInterface accessible as a singleton
...
- EditorPlugin.get_editor_interface() is removed as redundant.
2023-08-09 16:01:31 +02:00
Rémi Verschelde
821579e804
Merge pull request #80422 from AThousandShips/shader_test_fix
...
Remove use of `std::string` in test
2023-08-09 15:20:36 +02:00
Rémi Verschelde
835957b1fc
Merge pull request #79980 from bruvzg/fix_test_str_errs
...
[String] Fix Unicode parsing error message encoding and related JSON tests.
2023-08-09 15:20:16 +02:00
Markus Sauermann
59c13fea5d
Fix nodes receiving mouse events in black bars of `Window`
...
Previously for InputEvents there was no distinction between
Window-area and Viewport-area.
This was problematic in cases where stretching was used and the Window
contained black bars at the sides of the Viewport.
This PR separates the area of Window and Viewport regarding InputEvents.
2023-08-09 12:34:22 +02:00
Ninni Pipping
6ca1432daf
Remove use of `std::string` in test
...
Avoiding using the standard library here
2023-08-09 10:04:53 +02:00
Septian
56d7ff6e93
Improve PackedScene unit test for complex scene
2023-08-09 00:28:53 +07:00
Markus Sauermann
152572ac38
Fix global transform validity for `Node2D` and `Control`
...
Set global transform to invalid when changing transform
2023-08-08 12:22:55 +02:00
Johan Aires Rastén
6e1f68109b
Support shader preprocessor concatenation symbol
2023-08-08 10:56:20 +02:00
Rémi Verschelde
169a28bd0f
Merge pull request #80362 from Calinou/string-use-unicode-compiletime
...
Use compile-time Unicode string conversion
2023-08-07 14:55:58 +02:00
Rémi Verschelde
3532661a66
Merge pull request #79440 from sepTN/test-packed-scene
...
Add unit tests for PackedScene
2023-08-07 14:46:38 +02:00
Rémi Verschelde
432405a3e1
Merge pull request #79342 from RedworkDE/localize-win-path
...
Fix `ProjectSettings::localize_path` for Windows paths
2023-08-07 14:45:48 +02:00
Rémi Verschelde
66e40e402a
Merge pull request #79331 from azuloo/translation-server-test-suite
...
Add a test suite for TranslationServer
2023-08-07 14:45:24 +02:00
Rémi Verschelde
40f116f489
Merge pull request #73477 from Sauermann/fix-viewport-picking-unittest
...
Add Unit tests for viewport.cpp Physics 2D Picking
2023-08-07 14:43:13 +02:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
...
Also includes typo fixes from #79993 , #80068 , #80276 , and #80303 .
Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
Hugo Locurcio
e9f723006a
Use compile-time Unicode string conversion
...
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
Markus Sauermann
9014e9e424
Add Unit tests for viewport.cpp Physics 2D Picking
2023-08-07 09:06:19 +02:00
Septian
cd94f9ad08
Add unit tests for PackedScene
2023-08-06 23:51:31 +07:00
Markus Sauermann
1e9d241809
Actually store safe-rect in embedder
...
`sw` is a copy and not a reference.
Add unit-test for this case.
2023-08-02 17:51:52 +02:00
Marcin Nowak
34ab1c8a36
Implement loading DDS textures at run-time
2023-07-31 21:31:26 +02:00
bruvzg
84a6f0d232
[String] Fix Unicode parsing error message encoding and related JSON tests.
2023-07-28 12:27:01 +03:00
Pedro J. Estébanez
f34d580861
Revert "Implement parallel foreach() for easier multithreading"
...
This reverts commit e28868e30c
.
2023-07-27 13:41:27 +02:00
Yuri Sizov
d50c52652f
Merge pull request #79805 from kumikumi/fix-subviewport-cursor
...
Prevent SubViewportContainer overriding Subviewport's cursor with its own cursor
2023-07-26 18:40:30 +02:00
Yuri Sizov
53ba9ccb19
Merge pull request #72346 from myaaaaaaaaa/disconnect-order
...
Avoid sorting CallableCustomMethodPointers by their actual address values
2023-07-26 18:39:08 +02:00
RedworkDE
aee1e50b48
Fix `ProjectSettings::localize_path` for Windows paths
2023-07-26 16:18:31 +02:00
Mikko Ankkala
96b26574b9
Don't override SubViewport's cursor with SubViewportContainer's cursor
...
Add a warning for having a non-default value of `mouse_default_cursor_shape` in SubViewportContainer
Add test
2023-07-23 22:27:55 +03:00
Yuri Sizov
b8a29f71e5
Merge pull request #79444 from Miguel0312/TestInputEvent
...
Add a test suite to InputEvent
2023-07-21 17:54:35 +02:00
Yuri Sizov
8ac00453d9
Merge pull request #78667 from Scony/add-advanced-navserver-tests
...
Add advanced `NavigationServer3D` tests
2023-07-21 17:15:22 +02:00
Pawel Lampe
1612466803
Add advanced 'NavigationServer3D' tests
2023-07-17 19:56:02 +02:00
Miguel Pereira
c2ad5ca435
Added tests to InputEvent
2023-07-17 17:48:34 +02:00
Yuri Sizov
3d04a22d7c
Merge pull request #79103 from AThousandShips/array_slice_range
...
Fix range error for `Array.slice`
2023-07-17 16:48:48 +02:00
Hendrik Brucker
a29a680920
Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file
2023-07-17 13:25:00 +02:00
Yuri Sizov
a7583881af
Merge pull request #68460 from Geometror/split_texture_src
...
Extract and reorganize texture resource classes
2023-07-14 21:28:06 +02:00
Hendrik Brucker
7e21eb7e00
Extract and reorganize texture resource classes
2023-07-14 20:04:21 +02:00
Maxim Kulkin
058604f5b8
Fix crash when saving resources with circular references
...
When saving resources, marking of already seen resources was
done too late, causing infinite loop traversing referenced resources
and eventual stack overflow. The change marks traversed resource
before descending to it's children, thus when this resource is
encountered again, it is already marked as seen and traversal stops.
2023-07-14 19:20:04 +02:00
Yuri Sizov
7e9d63ebd9
Merge pull request #78480 from Scony/add-more-navserver-tests
...
Add more basic tests for `NavigationServer3D`
2023-07-14 18:49:03 +02:00
Yuri Sizov
2a595c26d9
Merge pull request #72784 from myaaaaaaaaa/parallel-foreach
...
Implement parallel `foreach()` for easier multithreading
2023-07-14 18:48:49 +02:00
Yuri Sizov
e88934cb74
Merge pull request #74238 from bitsawer/fix_image_convert
...
Fix `Image.convert()` overwriting custom mipmaps
2023-07-12 17:15:39 +02:00
Yuri Sizov
f6d568b9e4
Merge pull request #66170 from RedMser/json-fix-invalid-escapes
...
Disallow invalid escape sequences in `JSON.parse`
2023-07-12 15:08:29 +02:00
azuloo
dd0bd90865
Add a test suite for TranslationServer
2023-07-11 14:30:53 +03:00
MewPurPur
cc5500f7de
Fix erroneous pad_zeros warning
2023-07-08 16:16:01 +03:00
Ninni Pipping
7752a0d8d1
Fix range error for `Array.slice`
2023-07-07 23:19:42 +02:00
RedMser
427b293c7d
Disallow invalid escape sequences in JSON.parse
2023-06-30 21:28:36 +02:00
Rémi Verschelde
100082b3ac
Merge pull request #74760 from lassade/unicode-err-uses-replacement-char
...
Don't append non unicode scalar values on the string, instead use the unicode replacement char
2023-06-22 18:30:04 +02:00
Pawel Lampe
766afce7ea
Add more basic 'NavigationServer3D' tests
2023-06-21 19:46:38 +02:00
Yuri Roubinski
230385b587
Add `String.reverse` method
2023-06-21 20:40:48 +03:00
angel-721
ab4e89ecde
Add HTTPClient unit tests
2023-06-21 11:53:55 +02:00
Rémi Verschelde
d252f43a86
Merge pull request #78449 from Scony/add-agent-n-map-navserver-tests
...
Add `agent` and `map` tests for 'NavigationServer3D'
2023-06-21 10:19:24 +02:00
Pawel Lampe
e1bdde911c
Add `agent` and `map` tests for 'NavigationServer3D'
...
This commits fixes a bug in `free()` function as well.
2023-06-20 17:48:06 +02:00
myaaaaaaaaa
5cc961627d
Avoid sorting CallableCustomMethodPointers by their actual address values
2023-06-20 08:40:01 -04:00
Rémi Verschelde
cce100a840
Merge pull request #75459 from kleonc/node-fix-find-children
...
Fix recursive `Node.find_children`
2023-06-19 22:33:46 +02:00
Rémi Verschelde
867ea7fe59
Merge pull request #74730 from MarioLiebisch/fix-74726
...
Fix read-only dictionaries adding missing keys
2023-06-19 21:38:38 +02:00
andybarcia
553f4f8dce
Improve error reporting when parsing CSV translation file
...
Fixes #46682 .
Also fix unit test suite to separate generic FileAccess CSV testing
from using CSV as translation. And add more CSV translation tests.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-06-19 12:47:44 +02:00
Rémi Verschelde
1a62f1e4fc
Merge pull request #74741 from vnen/variant-not-for-everyone
...
Allow boolean operators for all Variant types
2023-06-18 16:28:10 +02:00
Rémi Verschelde
6fb391bc23
Fix various typos with codespell
...
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Rémi Verschelde
95a9089fdd
Merge pull request #74813 from bruvzg/text_edit_autowrap
...
[TextEdit] Expose all auto-wrap modes.
2023-06-15 16:08:21 +02:00
Pawel Lampe
b54c3e7e5e
Add initial 'NavigationObstacle' and 'NavigationRegion' tests
2023-06-14 22:24:37 +02:00
Rémi Verschelde
ae896bbd85
Merge pull request #78156 from Maran23/node-tests-processing-priority
...
Tests for the node (physics) processing and process priority
2023-06-13 10:27:40 +02:00
bruvzg
75e6ec8874
[TextEdit] Expose all auto-wrap modes.
2023-06-13 10:28:27 +03:00
Marius Hanl
60a17ba78d
Tests for node (physics) processing and process priority
2023-06-13 00:19:43 +02:00
Rémi Verschelde
54b0907e67
Merge pull request #78015 from MewPurPur/Mom-can-we-have-a-new-Godot-logo-----We-have-a-new-Godot-logo-at-home-----The-new-Godot-logo-
...
Standardize and Optimize blue robot SVGs
2023-06-12 22:55:12 +02:00
MewPurPur
a8412c12da
Standardize and Optimize blue robot SVG
...
Co-authored-by: Andre Vallestero <39736205+AndreVallestero@users.noreply.github.com>
2023-06-12 18:12:40 +02:00
myaaaaaaaaa
e28868e30c
Implement parallel foreach() for easier multithreading
2023-06-09 08:27:32 -04:00
Rémi Verschelde
577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
...
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Markus Sauermann
479f359ac4
Add unit test: mouse movement after slider release
2023-06-05 13:51:28 +02:00
Yuri Sizov
3a895eafc0
Merge pull request #77595 from Sauermann/fix-double-inputevent
...
Fix InputEvent being used twice
2023-05-30 15:25:36 +02:00
Markus Sauermann
a9bf3de08e
Fix InputEvent being used twice
...
A single mouse click can cause multiple actions, which contradicts
the paradigm that a single Input Event should cause only a single
action.
The solution consists of two parts:
1. Physics Picking as the last step during viewport input event
handling, currently doesn't set the event as handled. This PR sets
the event as handled in the case of physics picking.
2. After an InputEvent is processed by a SubVieportContainer, it is
sent to its parent, even if it set as handled within the SubViewport.
This PR adds an additional test to check if the event is handled
before propagating the event to the parent Control.
2023-05-29 02:39:09 +02:00
Kory Postma
c8cac39446
Grayscale fix for Image::premultiply_alpha() and Image::convert(FORMAT_L8) while using REC.709, with added test case
2023-05-27 18:01:44 -05:00
Silc Renew
42aa5398d9
Fix Pathfollow direction
...
Co-authored-by: aaronfranke <arnfranke@yahoo.com>
2023-05-24 17:37:00 +09:00
ajreckof
006e899bb3
sort code completions with rules
...
Fixups
Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible
Trying again to improve code completion
Sort code autocompletion options by similarity based on input
To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.
It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.
Also moves CodeCompletionOptionCompare to code_edit.cpp
Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
Biggles Bristol
c920a4f051
[Fixed] for "off-by-1" bug when sampling "baked" curve data towards the end of the curve.
...
[Fixed] Failing test "[Curve] Custom curve with free tangents" by setting the curve's `bake_resolution` to 11.
[Fixed] test messages in "[Curve] Custom curve with free tangents" to match sample offset used in each test
[Added] New test "[Curve] Straight line offset test" in response to pull request feedback.
Update tests/scene/test_curve.h
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2023-05-20 11:28:09 +01:00
myaaaaaaaaa
c996863464
Streamline WorkerThreadPool tests and make them more robust
2023-05-17 17:33:08 -04:00
Rémi Verschelde
186aa649d2
Merge pull request #76945 from RandomShaper/fix_wtp
...
Fix multiple issues in `WorkerThreadPool`
2023-05-12 10:03:45 +02:00
Rémi Verschelde
863bcd3e2b
Merge pull request #76936 from clayjohn/revert-hsl
...
Revert "Add API for HSL conversion"
2023-05-12 10:03:21 +02:00
Pedro J. Estébanez
9077bb9232
Fix multiple issues in WorkerThreadPool
...
- Fix project settings being ignored.
- Made usages of `native_thread_allocator` thread-safe.
- Remove redundant thread-safety from `low_priority_threads_used`, `exit_threads`.
- Fix deadlock due to unintended extra lock of `task_mutex`.
2023-05-11 16:10:09 +02:00
Rémi Verschelde
fd4a06c515
Merge pull request #76906 from lawnjelly/safe_acos4_2
...
Make acos and asin safe
2023-05-11 13:33:37 +02:00
lawnjelly
50c5ed4876
Make acos and asin safe
...
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.
The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-05-11 08:34:34 +01:00
clayjohn
f83a90192f
Revert "Add API for HSL conversion"
...
This reverts commit 0b7fd664c1
.
2023-05-10 17:45:56 -03:00
Alex Drozd
cdf9c33c35
add unit tests for Curve3D
2023-05-10 19:12:06 +02:00
Rémi Verschelde
703a3ce7ad
Merge pull request #76830 from ajreckof/fix_wrapf_CI_with_too_big_float
...
fix a test for wrapf with signed 32-bit float
2023-05-10 10:20:03 +02:00
Rémi Verschelde
6bca6beea3
Merge pull request #76878 from RedworkDE/tests-fix-errors
...
Fix various errors when running the unit tests
2023-05-09 19:28:54 +02:00
Rémi Verschelde
0f444f101a
Merge pull request #76661 from bonjorno7/hsl
...
Add API for HSL conversion
2023-05-09 19:28:35 +02:00
RedworkDE
8e7afec479
Fix various errors when running the unit tests
...
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-05-09 18:40:56 +02:00
bonjorno7
0b7fd664c1
Add API for HSL conversion
...
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
ajreckof
fabd9535f0
fix a test for wrapf with signed 32-bit float
2023-05-08 20:53:58 +02:00
Paulb23
0b3fba45c6
Move convert_indent into CodeEdit
2023-05-07 13:08:37 +01:00
Clay John
7a13cf9aeb
Merge pull request #75510 from SilicDev/string_erase
...
Reimplement `String.erase()` as immutable method
2023-05-05 10:03:49 -07:00
SilicDev
6fa4f71ca6
Reimplement String.erase
2023-05-04 00:52:35 +02:00
Rémi Verschelde
e0e93ce094
Merge pull request #72421 from myaaaaaaaaa/signal-hashmap
...
Store Object signals in a HashMap rather than a VMap
2023-04-25 19:26:35 +02:00
Silc Renew
fac8a918f9
Expose interpolation methods for 3D track in Animation class
2023-04-25 01:45:14 +09:00
Rémi Verschelde
c0ee2b4968
Merge pull request #76145 from manueldun/usability-auto-indent
...
Fix auto-indentation in typed arrays, comments, and after colon
2023-04-24 16:45:35 +02:00
Manuel Dun
fa7e6ddb83
Fix auto-indentation in typed arrays, comments, and after colon
...
Now the editor won't add indentation when pressing enter, is
declaring typed variables and there is a colon in the comment
example:
var a:=0#:[press enter]
no indentation
2023-04-20 18:48:21 -04:00
kendelle
0ec48a43d6
Updated Varaint assignemnt unit tests with Vec4,Vec4i,Rect2,Rect2i,Trans2d,Trans3d,Color,,Plane,Basis,AABB,Quant,Proj,RID,and Object
...
Updated Varaint assignemnt unit tests with Vec4,Vec4i,Rect2,Rect2i,Trans2d,Trans3d,Color,,Plane,Basis,AABB,Quant,Proj,RID,and Object
Updated Varaint assignemnt unit tests with
Vec4,Vec4i,Rect2,Rect2i,Trans2d,Trans3d,Color,,Plane,Basis,AABB,Quant,Proj,RID,and Object
2023-04-19 11:23:11 -05:00
kleonc
d159123633
Fix recursive Node.find_children
2023-04-09 09:15:21 +02:00
Juan Linietsky
223ce4fcb9
Optimize Node::add_child validation
...
Adding 10k nodes is almost twice as fast.
2023-04-07 13:18:47 +02:00
Rémi Verschelde
1e0f7a12f7
Merge pull request #73121 from Scony/add-initial-navi-tests
...
Add initial navigation tests
2023-03-16 10:46:34 -07:00
Ninni Pipping
10f385fb79
Fix `Array.slice()` rounding for `abs(step) != 1`
2023-03-14 15:46:45 +01:00
Felipe Jorge
999f3e2c13
use the unicode replacement char on error
...
update tests
also fix utf8 and ascii parse functions to use the replacement char
created a _replacement_char const inside the string
2023-03-12 11:46:56 -03:00
Mario Liebisch
62e1a5e235
Added two test cases
2023-03-11 18:53:17 +01:00
George Marques
a1e3ef919c
Add operator NOT for all Variant types
2023-03-10 15:58:55 -03:00
bitsawer
5a9d7fd8a6
Fix Image.convert() overwriting custom mipmaps
2023-03-02 16:46:06 +02:00
myaaaaaaaaa
1ec5381c16
Store Object signals in a HashMap rather than a VMap
2023-02-25 18:44:09 -05:00
Dmitrii Maganov
c5f7a89b0f
Core: Identity compare objects by id, not by pointers
2023-02-24 23:33:29 +02:00
Aaron Franke
c551d7489c
Explicitly cast to Variant's int type in Time tests
2023-02-20 14:46:21 -06:00
Paulb23
60161cbe7d
Fix ctrl+backspace crash with multicarets on the same line
2023-02-19 12:04:14 +00:00
myaaaaaaaaa
6b0f253a45
Fix PagedArray.merge_unordered() dropping pages
2023-02-16 19:58:27 -05:00
Pawel Lampe
e92adba19c
Add initial navigation tests
2023-02-13 21:39:09 +01:00
Andrés Botero
a90e151b2a
Added component-wise `min` and `max` functions for vectors
2023-02-11 15:03:11 -05:00
Rémi Verschelde
cd7c65ab67
Merge pull request #72862 from Sauermann/fix-viewport-event-unittests
...
Add Unit Tests for Viewport InputEvent handling
2023-02-09 16:21:09 +01:00
Rémi Verschelde
ab4a7b2b77
Merge pull request #72547 from MewPurPur/string-split-fix
...
Fix String.split() with empty string and delimeter
2023-02-09 16:12:57 +01:00
Markus Sauermann
ce6c290528
Add Unit Tests for Viewport InputEvent handling
2023-02-09 14:53:04 +01:00
Markus Sauermann
1b2ba353dc
Remove `m_object` parameter from unit test Macros
...
This serves no longer any purpose and can be removed.
2023-02-09 00:20:25 +01:00
Markus Sauermann
39d79ce217
Fix mouse-button-mask on button release in unit test
...
On mouse-button release, the mask is 0.
2023-02-08 01:17:40 +01:00
VolTer
57e39d0ce9
Fix String.split() with empty string and delimeter
2023-02-02 01:34:11 +01:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list
2023-02-01 12:11:36 +01:00
Rémi Verschelde
cf2bf08b41
Merge pull request #71972 from Sauermann/fix-test-ds
...
[unittests] Send Mouse events via DisplayServer instead of push_input
2023-01-31 15:56:50 +01:00
myaaaaaaaaa
132e987633
Fail instead of segfaulting in IO tests
2023-01-31 02:21:27 -05:00
Rémi Verschelde
2d47c4c307
Merge pull request #72213 from ARez2/ARez2/master
...
Add Unit test for InputEventMouse
2023-01-30 10:00:45 +01:00
Markus Sauermann
7de1b1a40d
[unittests] Send Mouse events via DisplayServer instead of push_input
...
Currently Unittests simplify mouse-events by just pushing them to Viewports.
For dealing with mouse-screen-coordinates (caused by the introduction of
multiple native Windows) it becomes necessary to extend the
DisplayServer functionality for unittests.
This PR introduces DisplayServerMock based on DisplayServerHeadless,
which additionally supports basic Mouse-Input handling.
2023-01-29 21:29:39 +01:00
ARez
23827d4303
Add Unit test for InputEventMouse
2023-01-29 14:09:53 +01:00
Aaron Franke
5f3d3722b2
Add support for interpolating skewed transforms
2023-01-28 18:28:42 -06:00
Adam Scott
37248d7c87
Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()`
2023-01-25 10:46:21 -05:00
Jan Haller
83026126d4
Add tests to ensure bound methods and signals are valid identifiers
2023-01-23 21:19:57 +01:00
bruvzg
daad4aed62
Cleanup and unify keyboard input.
...
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
Rémi Verschelde
65883cc73b
Merge pull request #71598 from bruvzg/gdscript_bidi_override
...
Implement BiDi override mode for GDScript source.
2023-01-19 19:33:18 +01:00
Rémi Verschelde
8b92316368
Merge pull request #71565 from RedworkDE/doc-arraymesh-add-surface
...
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
2023-01-19 19:32:37 +01:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators.
2023-01-19 12:50:49 +02:00
RedworkDE
be4eb3bbdd
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
...
Also clarify some related documentation and expose the misssing `ArrayFormat::ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`
2023-01-19 10:30:25 +01:00
bruvzg
5361ec9f43
Implement BiDi override mode for GDScript source.
2023-01-18 19:22:20 +02:00
kobewi
b427d3585c
Allow unindent without selection
2023-01-18 17:05:15 +01:00
Rémi Verschelde
517b7fc468
Merge pull request #71308 from hcoura/test-curve-2d
...
Add unit tests for Curve2D
2023-01-16 09:25:15 +01:00
Raul Santos
7560340ef6
Rename `center` method to `get_center` in Plane.
2023-01-15 17:18:50 +01:00
Paulb23
1aac10d73d
Fixed adding extra quote when completing strings
2023-01-14 15:28:22 +00:00
Marius Hanl
d2f246806c
Added more node tests
...
Testing the following functions:
- reparent
- duplicate
- replace_by (also with keeping groups)
2023-01-14 00:23:58 +01:00
Henrique Coura
d9ceddd86b
Add unit tests for Curve2D
2023-01-13 13:54:45 -03:00
Rémi Verschelde
6a86dfad29
Fix typos with codespell
...
Also includes #71080 .
Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
2023-01-09 08:39:07 +01:00
Juan Linietsky
2b815df3c1
Use BitField<> in core type masks
...
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection.
2023-01-07 11:14:35 +02:00
Rémi Verschelde
798582acf0
Merge pull request #65609 from dalexeev/animated-sprite
...
`AnimatedSprite{2D,3D}` improvements
2023-01-05 15:00:31 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
...
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Danil Alexeev
0d25d8e7fc
`AnimatedSprite{2D,3D}` improvements
...
* Add support for individual frame duration to `SpriteFrames`.
* Various minor improvements.
2023-01-05 13:13:25 +03:00
Rémi Verschelde
565ae3b767
Merge pull request #67694 from aaronfranke/its-time
...
Remove duplicate Month and Weekday enums
2023-01-03 23:21:19 +01:00
Rémi Verschelde
5e78f0f782
Merge pull request #70840 from MewPurPur/get-point-count-instead-of-points
...
Rename `get_points_count()` to `get_point_count()` in Gradient
2023-01-03 15:46:18 +01:00
Rémi Verschelde
7fb6d70398
Merge pull request #70152 from Maran23/4-x-tests-for-node
...
Initial tests for node
2023-01-03 12:40:44 +01:00
Marius Hanl
eec42f1aab
Add initial tests for Node
...
- Test simple and complex cases for:
-> add, remove, move, get, find, count, is_inside_tree
-> name, nodepath
-> verify the scene tree
- Simple tests for the processing setup
2023-01-03 07:50:20 +01:00
VolTer
1af833be95
Rename get_points_count() to get_point_count() internally
2023-01-02 16:52:05 +02:00
Marius Hanl
b9be3ce75e
Add tests for signals
...
- Adding signals
- Emitting signals
2022-12-29 16:07:45 +01:00
Aaron Franke
8d7d1b0bb2
Remove duplicate Month and Weekday enums
...
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-26 15:16:25 -06:00
Yuri Rubinsky
b6e06038f8
Merge pull request #70396 from jainl28patel/VisualShader-unit-test
2022-12-26 15:13:56 +03:00
jainl28patel
e4f4fb580e
Add unit test for VisualShader
2022-12-26 16:52:07 +05:30
Marius Hanl
5aa243f9da
Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
...
Also added tests for the project settings.
Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Paulb23
29f7bea241
Fix autocomplete with autobrace completion not adding closing pair
2022-12-19 14:20:52 +00:00
Rémi Verschelde
03cc4c3f3b
Merge pull request #70168 from Haydoggo/autocomplete-placement-fix
...
Fix autocomplete box placement
2022-12-17 12:23:15 +01:00
Hayden Leete
530b1f3f7a
Fix autocomplete box placement
2022-12-17 12:33:29 +13:00
Haoyu Qiu
207e52c161
Fix String::word_wrap() for long words
...
- Changes `TextServer.string_get_word_breaks()`
- Returns pairs of boundary start and end offsets
- Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
Hendrik Brucker
0b07da8ebc
[Tests] Get rid of several error messages when running the test suite
2022-12-12 19:17:50 +01:00
Rémi Verschelde
907298d673
Merge pull request #68747 from rune-scape/rune-stringname-unification
...
GDScript: Unify StringName and String
2022-12-09 18:06:48 +01:00
Rémi Verschelde
83b426bca5
Merge pull request #67906 from groud/simpler_gdextension_config
...
Remove unnecessary checks when exporting gdextension binaries and allow using a prefix to auto-detect files
2022-12-06 11:01:09 +01:00
rune-scape
e79be6ce07
Unify String and StringName
2022-12-05 21:46:47 -05:00
Yaohua Xiong
91e9ad92f5
Refactor baking code for Curve2D
...
The main change is to caculate tangent directly from bezier curve, without going
through discretized polyline, avoiding pitfalls of discretization. A similar refacor
had been applied to Curve3D.
The test cases for Curve2D is updated, comparing floating point with is_equal_approxmiate()
instead of `==`, in order to avoid float precision problem.
2022-12-05 21:22:05 +08:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
...
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-04 18:44:20 +02:00
Gilles Roudière
fa4143cdeb
Allow specifying a prefix to automatically detect library files for gdextension exports
2022-12-01 18:20:40 +01:00
Rémi Verschelde
4a8b725bc9
Merge pull request #68386 from MewPurPur/snappedi-snappedf
...
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-24 18:54:49 +01:00
Bastiaan Olij
a479f5af22
Improve logic for detecting and tracking extensions
2022-11-24 21:48:16 +11:00
Adam Scott
0c64304ba5
Fix error while selecting last empty line
2022-11-23 09:21:41 -05:00
Micky
e791f4fce2
Double precision of `String.split_floats`
2022-11-20 12:29:50 +01:00
VolTer
e26f0906f2
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-19 06:18:55 +01:00
Rémi Verschelde
d93bec61c3
Merge pull request #68432 from Geometror/generic-math-func-tests
...
Generic math function tests: Test float and double variants
2022-11-18 16:21:39 +01:00
Ninni Pipping
f0099b28b1
Fix polygon generation in BitMap
2022-11-17 10:31:14 +01:00
clayjohn
9ce57050a5
Add GPUParticles to the OpenGL3 renderer.
...
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.
This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
Hendrik Brucker
1f36dbdf23
Generic math function tests: Test float and double variants
2022-11-09 01:51:55 +01:00
kobewi
d9f066d5fa
Remove duplicate project settings definitions
2022-11-08 01:29:39 +01:00
Rémi Verschelde
f814e15c7f
Merge pull request #67976 from alfredbaudisch/select-next-occurrence-better-test
...
Improve TextEdit::add_selection_for_next_occurrence test case
2022-11-06 16:10:58 +01:00
Rémi Verschelde
44a0b86f93
Merge pull request #68275 from Geometror/doctest-approx
...
[Tests] Replace Math::is_equal_approx with == and doctest::Approx
2022-11-06 15:58:00 +01:00
Hendrik Brucker
f906ff8f89
[Tests] Replace Math::is_equal_approx with == and doctest::Approx
2022-11-05 02:28:00 +01:00
kobewi
8a47a12207
Add support for empty delimiter in String.split
2022-11-04 15:09:12 +01:00
Hendrik Brucker
e62955b45b
Add a test suite for `Math::` namespace functions
...
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-11-04 03:08:08 +01:00
Aaron Franke
9e952c8386
Allow getting Quaternion rotation in different Euler orders
2022-11-02 19:20:10 -05:00
Rémi Verschelde
08d56ac2f1
Merge pull request #66747 from aaronfranke/move-euler-order
...
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 22:37:12 +01:00
Rémi Verschelde
18380817f2
Merge pull request #67274 from jbcolli2/Primitive_Tests
...
Unit Tests for all Primitive Meshes.
2022-11-02 22:37:06 +01:00
Rémi Verschelde
9ec7aadc06
Merge pull request #66017 from Mickeon/rename-image-copy-rect
...
Rename Image's `get_rect` to `get_region`
2022-11-02 22:36:57 +01:00
Aaron Franke
8556fdd4bc
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 13:44:13 -05:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
...
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
1bff95ad49
Merge pull request #66927 from jbcolli2/Path2d-Tests
...
Unit tests for Path2D class
2022-11-02 18:53:15 +01:00
Micky
ebf86c96e9
Rename Image's `get_rect` to `get_region`
...
Also renames its parameter to from "rect" to "region".
2022-11-01 23:35:48 +01:00
Aaron Franke
83634119d4
Replace Quaternion Euler constructor with `from_euler` method
2022-11-01 09:28:12 -05:00
Rémi Verschelde
1211f9d9b6
Merge pull request #67800 from jbcolli2/ArrayMesh-UnitTests
...
Unit Tests for ArrayMesh class for Issue #43440
2022-10-31 11:58:28 +01:00
Rémi Verschelde
f0dcefe5f8
Merge pull request #66380 from aaronfranke/basis-euler-test
...
Simplify Euler order test code in test_basis.h
2022-10-31 10:55:37 +01:00
Rémi Verschelde
273410ba5a
Merge pull request #67139 from PucklaMotzer09/insert_caret_at_carets
...
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-31 10:32:07 +01:00
Max Hilbrunner
11d74d606a
Merge pull request #67980 from DeeJayLSP/webpcase
...
Change all WEBP strings and comments to WebP
2022-10-29 19:28:47 +02:00
Clay John
04ac91f786
Merge pull request #67790 from kdada/fix-flash-window
...
Make creating window do not flicker when specify custom position
2022-10-28 13:02:58 -07:00
DeeJayLSP
dd64ceab47
Change all WEBP strings and comments to WebP
2022-10-28 15:17:49 -03:00
Alfred Reinold Baudisch
e46e70f8ee
Improved TextEdit::add_selection_for_next_occurrence test case
...
It covers additional selections of different words, as well manually adding a cursor in between and selecting the next occurrence. The previous test also was outdated in regards of not testing the implicit call to `select_word_under_caret` made by `add_selection_for_next_occurrence` in case there's no selection.
2022-10-28 15:35:43 +02:00
Clay John
0486810697
Merge pull request #67644 from alfredbaudisch/add-selection-next-occurrence
...
Add Selection and Caret for Next Occurrence of Selection
2022-10-27 17:21:49 -07:00
Aaron Franke
fae4ed5a98
Simplify Euler order test code in test_basis.h
2022-10-27 12:10:57 -05:00
jbcolli2
24a3556bea
ArrayMesh unit tests
2022-10-24 15:15:05 -04:00
Wei Guo
d7e39e313b
Make window creation with custom position do not flash
2022-10-24 13:50:25 +08:00
Aaron Franke
7f9a8c99c9
Clean up Basis from Euler code
2022-10-21 17:54:49 -05:00
Alfred Reinold Baudisch
7d15ecc3af
Add Selection and Caret for Next Occurrence of Selection
...
Adds the bind `add_selection_for_next_occurrence` to TextEdit, with CTRL+D as the default shortcut.
When the bind is performed, ff a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.
If no selection is currently active with the last caret in text fields, selects the word currently under the caret.
The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. The viewport is adjusted to the latest newly added caret.
The bind and the behaviour is similar to VS Code's "Add Selection to Next Find Match" and JetBrains' "Add Selection for Next Occurrence". It takes advantage of the multi-caret API.
The default shortcut for `select_word_under_caret` has been changed to ALT+G, in order to give priority to CTRL+D for `add_selection_for_next_occurrence` to better align with popular IDEs and editors.
2022-10-21 08:26:53 +02:00
PucklaMotzer09
e5354cacd0
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-18 10:38:53 +02:00
Rémi Verschelde
fde8838316
Merge pull request #67463 from aaronfranke/num-real-negative
...
Fix big negative numbers printing incorrect decimals in `num_real`
2022-10-17 17:31:47 +02:00
Paulb23
4bfb1d953c
Fix undo redo not adjusting TextEdit viewport to caret
2022-10-16 19:30:03 +01:00
Aaron Franke
c60ac64e8f
Fix big negative numbers printing incorrect decimals in num_real
2022-10-15 17:57:54 -05:00
jbcolli2
ad16187a4a
PrimitiveMesh unit tests.
2022-10-14 12:23:36 -04:00
kobewi
072f6feaba
Make some Image methods static
2022-10-14 14:34:15 +02:00
Rémi Verschelde
f12c4e8b9a
Merge pull request #67251 from groud/simplify_path_solve_urls
...
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 15:24:18 +02:00
Gilles Roudière
bf1a40c168
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 12:23:49 +02:00
jbcolli2
92a466c162
Unit tests for Path2D module.
...
Co-authored-by: Matthew-Tave <tavematthew@gmail.com>
2022-10-12 22:00:34 -04:00
Paulb23
f3eb543e67
Fix select word under caret using caret col instead of line
2022-10-11 20:32:06 +01:00
Rémi Verschelde
58eff50bf1
Merge pull request #64268 from timothyqiu/is-finite
...
Add `is_finite` method for checking built-in types
2022-10-11 09:25:46 +02:00
Rémi Verschelde
4be5660223
Merge pull request #67145 from Paulb23/tab_textedit
...
Fix inserting tabs in TextEdit
2022-10-10 13:52:42 +02:00
Haoyu Qiu
eac9adf7a1
Don't allow removing TextEdit's main caret
2022-10-10 08:30:23 +08:00
Paulb23
7333aa68f4
Handle tab in TextEdit
2022-10-09 17:46:40 +01:00
Haoyu Qiu
5da515773d
Add `is_finite` method for checking built-in types
2022-10-08 13:25:08 +08:00
Paulb23
4a9d4e3dad
Add mutliple Caret support to TextEdit
2022-10-05 17:19:26 +01:00
Rémi Verschelde
54418ea659
Remove NO_THREADS fallback code, Godot 4 requires thread support
...
This also removes `OS::can_use_threads` from the public API since it's always
true.
2022-10-03 11:23:26 +02:00
Rémi Verschelde
d9a3888cea
Merge pull request #66133 from aaronfranke/set-all
...
Delete `set_all`, `set_axis`, and `get_axis` methods from Vector2/3/3i/4/4i
2022-10-03 09:23:46 +02:00
Rémi Verschelde
cf6978f286
Merge pull request #64833 from MarcusElg/naninfprinting
...
Improve string formatting (%f and %v) for inf and nan
2022-10-03 09:23:12 +02:00
Rémi Verschelde
166df0896c
Fix typos with codespell
...
Using codespell 2.3-dev from current git.
And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
bruvzg
8f5d56e04a
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
2022-09-28 10:04:11 +03:00
Rémi Verschelde
7562932eb2
Merge pull request #66160 from dpalais/double_time
...
Use double instead of real_t type for time-related parameters and variables
2022-09-27 10:04:10 +02:00
Dave Palais
0c46068af0
Change time parameters and variables to double type
...
Addresses #65313
2022-09-26 13:52:54 -05:00
Micky
ef8fbae929
Add more tests for Vector* types
2022-09-25 22:58:58 -05:00
Aaron Franke
fd8bd27657
Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4i
2022-09-19 15:08:50 -05:00
fabriceci
9f1a57d48b
Test, refactor and fix a bug in Basis.get_axis_angle
2022-09-14 12:05:22 +02:00
Haoyu Qiu
f5760ed65d
Fix parsing of XML CDATA and add test cases
2022-09-09 09:42:24 +08:00
bruvzg
6f4d233062
Fix key mapping changes when moving from macOS to other platform
...
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Ricardo Buring
532e378cd9
Expose registration of physics servers to GDExtension
...
This exposes PhysicsServer2DManager and PhysicsServer3DManager.
2022-09-07 15:05:46 +02:00
Rémi Verschelde
3515382390
Merge pull request #64361 from Mickeon/rename-caret-blink
...
Rename every instance of `caret_blink_speed` to `caret_blink_interval`
2022-09-07 08:51:02 +02:00
Micky
6dbd283ae5
Rename every instance of `caret_blink_speed` to `caret_blink_interval`
...
It's been changed in EditorSettings, LineEdit, TextEdit.
Affects setters and getters, and passed parameters, too.
2022-09-06 18:37:17 +02:00
Aaron Franke
995b9f94e8
Replace Rect2(i) has_no_area with has_area
2022-09-04 23:03:36 -05:00
Aaron Franke
817ae95667
Replace AABB has_no_volume with has_volume
...
Also replace has_no_surface with has_surface
2022-09-04 23:03:36 -05:00
Rémi Verschelde
33b4153764
Merge pull request #64917 from Tim-Fronsee/fix/add-gutter-total-width
2022-09-02 20:52:11 +02:00
Rémi Verschelde
c82bbc38a5
Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param
2022-09-02 13:49:53 +02:00
Hendrik Brucker
ea0472fecf
Refactor BitMap and add tests
...
Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
2022-09-01 18:39:17 +02:00
Rémi Verschelde
f02134a8c0
Merge pull request #55617 from madmiraal/fix-55384
2022-09-01 18:20:01 +02:00
Rémi Verschelde
41156a1e83
Merge pull request #63968 from KoBeWi/finding_stuff_in_a_dictionary
2022-09-01 17:38:39 +02:00
Yuri Rubinsky
8191b3c110
Rename `uniform` to `parameter` across the engine
2022-09-01 11:42:57 +03:00
Tim Fronsee
e5c183b01e
Fix TextEdit::gutters_width (total gutter width) when adding & removing a gutter by calling TextEdit::_update_gutter_width in TextEdit::add_gutter & TextEdit::remove_gutter
...
Update TextEdit gutters subcase, gutter add and remove to ensure gutter total width is correct
Fix test_code_edit symbol lookup test case to include padding (+2)
2022-08-31 10:01:40 +09:00
Hugo Locurcio
ae18928748
Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`
...
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
Marcel Admiraal
0046d320bb
Fix Geometry3D::get_closest_points_between_segments() returns NaN
...
Also fix:
- Geometry3D::get_closest_distance_between_segments() returning
incorrect values.
- Test for Geometry3D::get_closest_distance_between_segments() testing for
an incorrect value.
2022-08-30 12:13:11 +01:00
Danil Alexeev
d4555ef5fb
Add `String.to_{camel,pascal,snake}_case` methods
2022-08-30 12:36:24 +03:00
Aaron Franke
10a56981dc
Rename String `plus_file` to `path_join`
2022-08-29 19:38:13 -05:00
Rémi Verschelde
e60086f98b
Merge pull request #64119 from YuriSizov/theme-init-database
2022-08-29 14:02:21 +02:00
Rémi Verschelde
fd6453c45e
Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
...
This reverts commit 4b817a565c
.
Fixes #64988 .
Fixes #64997 .
This caused several regressions (#64988 , #64997 ,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605 )
which point at a flaw in the current logic:
- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
`NOTIFCATION_THEME_CHANGED` as introduced in #62845 .
- Some classes use their `THEME_CHANGED` to cache theme items in
member variables (e.g. `style_normal`, etc.), and use those member
variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
notification is now deferred, they end up accessing invalid state and this
can lead to not applying theme properly (e.g. for EditorHelp) or crashing
(e.g. for EditorLog or CodeEdit).
So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?
Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
does arrive for the first time. But that means having a temporary invalid
(and possibly still crashing) state, and doing some computations twice
which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Aaron Record
4b817a565c
Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
2022-08-27 11:52:29 -06:00
Yuri Sizov
6320a0fc18
Add ThemeDB, expose previously static Theme methods
2022-08-26 19:23:05 +03:00
Micky
59e11934d8
Rename `str2var` to `str_to_var` and similar
...
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.
- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`
- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
88145e81e2
Merge pull request #64804 from Mickeon/rename-path-progress
2022-08-25 18:35:48 +02:00
Marcus Elg
b21460981d
Improve string formatting for %f and %v for inf and nan
2022-08-25 07:41:21 +02:00
Marcus Elg
acd9736fc9
Formatting changes to string test comments
2022-08-24 16:23:53 +02:00
Micky
bb936b2e27
Rename PathFollow's `offset`s to `progress` & `progress_ratio`
...
Applies for both PathFollow2D and PathFollow3D
2022-08-24 01:56:03 +02:00
Rémi Verschelde
08d8f884cd
Merge pull request #63728 from MarcusElg/%v
...
Add %v for formatting vectors
2022-08-24 00:42:47 +02:00
Rémi Verschelde
649e76aa38
Merge pull request #64639 from Geometror/test-quickadd-script
2022-08-23 18:17:24 +02:00
Marcus Elg
dbc165715b
Add %v for formatting vectors
2022-08-23 17:26:06 +02:00
kobewi
8be27dc59e
Replace Array return types with TypedArray
2022-08-22 22:42:36 +02:00
Rémi Verschelde
0cea7e3f64
Merge pull request #62545 from yedpodtrzitko/yed/pytest-builders
2022-08-22 19:32:11 +02:00
Hendrik Brucker
3168a6a303
Add a Python script to create new test suites more quickly
...
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-08-20 14:41:05 +02:00
Jiri Suchan
388d35b74d
ci: add basic test pipeline for shader builders
2022-08-19 20:32:13 +09:00
Yuri Sizov
980f5f32f4
Make `property_*_revert` methods multilevel and expose them for scripting
2022-08-18 00:03:53 +03:00
kobewi
cc424bcb18
Add Dictionary.find_key()
2022-08-16 13:48:59 +02:00
antonWetzel
40a1d6d100
vector4 distance_squared_to and update csharp
2022-08-09 01:59:17 +02:00
Yuri Sizov
1362bc22bd
Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript
2022-08-08 16:36:01 +03:00
Hendrik Brucker
36061c5dca
Vector4/Vector4i: Add missing methods, tests and fix change of sign operator
2022-08-07 12:25:05 +02:00
bruvzg
4b155b939b
[Text Server] Prevent composite glyphs which incorporate kashida from being used for justification. Update TextServer tests to clean up on fail.
2022-08-05 19:35:38 +03:00
Rémi Verschelde
62423b691e
Tests: Silence some intentional errors
...
Also fix printing messages in ClassDB test.
2022-08-04 22:03:44 +02:00
jtorre39
667faa68e9
Add unit tests for all public methods in the SpriteFrames class
2022-08-04 14:27:14 +02:00
Rémi Verschelde
426240f18a
Merge pull request #50907 from codepatzer/quaternion_ut
2022-08-04 14:26:46 +02:00
Rémi Verschelde
29afda3fd5
Merge pull request #60736 from StrawbDev/audio-stream-sample-unit-test
2022-08-04 13:56:53 +02:00