Commit graph

122 commits

Author SHA1 Message Date
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
Hendrik Brucker
a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
Hendrik Brucker
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02: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
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
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
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
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
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
Alex Drozd
cdf9c33c35 add unit tests for Curve3D 2023-05-10 19:12:06 +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
Paulb23
0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00
Silc Renew
fac8a918f9 Expose interpolation methods for 3D track in Animation class 2023-04-25 01:45:14 +09: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
kleonc
d159123633 Fix recursive Node.find_children 2023-04-09 09:15:21 +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
Paulb23
60161cbe7d Fix ctrl+backspace crash with multicarets on the same line 2023-02-19 12:04:14 +00:00
Pawel Lampe
e92adba19c Add initial navigation tests 2023-02-13 21:39:09 +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
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +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
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
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
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
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
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
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
jainl28patel
e4f4fb580e Add unit test for VisualShader 2022-12-26 16:52:07 +05:30
Paulb23
29f7bea241 Fix autocomplete with autobrace completion not adding closing pair 2022-12-19 14:20:52 +00:00
Hayden Leete
530b1f3f7a Fix autocomplete box placement 2022-12-17 12:33:29 +13:00