Commit Graph

686 Commits

Author SHA1 Message Date
25cbb682f5 Fix code completion override of home and end keys 2023-10-06 14:48:45 -04:00
c2b916751d Merge pull request #82786 from theraot/donotreplacestartingdigitwithunderscore
Do not replace starting digit with underscore when making identifier
2023-10-05 12:29:42 +02:00
09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
aa554e8278 Merge pull request #82694 from BrianMacIntosh/master
"Whole Words" search can detect word boundaries inside the search term.
2023-10-05 10:08:58 +02:00
5cd7ca0ccc Do not replace starting digit with underscore when making identifier 2023-10-04 08:05:04 -05:00
b11309ddb6 Merge pull request #81633 from matorin57/code-completion-popup
Avoid resetting the code completion popup excessively
2023-10-03 17:20:49 +02:00
676627e1d1 "Whole Words" search can detect word boundaries inside the search term.
For example, searching for ".func" will now match in "a.func" even with Whole Words enabled.
2023-10-02 13:47:59 -07:00
3a39de4e2f Add rotate_toward and angle_difference to GDScript and C# 2023-10-01 22:19:42 +02:00
3ec673085b Merge pull request #79523 from aaronfranke/is-conformal
Add `is_conformal` method to Basis and Transform2D
2023-09-26 13:44:41 +02:00
7dccb9e039 Merge pull request #80796 from smix8/navgenerator_2d_4.x
Add 2D navigation mesh baking
2023-09-26 08:17:58 +02:00
d2e651f403 Add Duplicate Lines shortcut to CodeTextEditor
This keyboard shortcut has been made with inspiration from the VS Code keyboard shortcut editor.action.copyLinesDownAction. It duplicates all selected lines and inserts them below no matter where the caret is within the line.
2023-09-25 23:41:31 +02:00
0ee7e3102b Add 2D navigation mesh baking
Adds 2D navigation mesh baking.
2023-09-25 19:48:14 +02:00
bcfb2c0089 Simplify Geometry3D tests 2023-09-25 01:54:22 -05:00
303d0994e9 Avoid resetting the code completion popup excessively 2023-09-20 15:49:25 -05:00
734b9d2379 Fix Curve3D baking up vectors for nontrivial curves.
The code was modified in 42aa539 to have a different basis vector, but
this line was missed and caused up vectors to invert sometimes.

Fixes #81879
2023-09-18 18:50:36 -06:00
77623d0a36 Merge pull request #81354 from MJacred/textedit_pixel_pos_fix
Fix `TextEdit.get_rect_at_line_column returning` negative pos even though cursor is in viewable area of the control
2023-09-18 10:37:59 +02:00
721cac4a38 Merge pull request #81456 from AThousandShips/test_fix
Fix errors when testing `Resource`
2023-09-14 15:21:37 +02:00
56806ffeed Add is_conformal method to Basis and Transform2D 2023-09-13 17:20:30 -05:00
38ca83e16f Merge pull request #81464 from AcatXIo/fix-sign-nan
Fix `SIGN(NAN)` returning 1
2023-09-12 12:01:39 +02:00
5c43e4c1ef Fix various typos with codespell
Using 2.2.6.dev180+ge3a2cfbd.
2023-09-12 08:54:18 +02:00
67dce301aa Add code region folding to CodeEdit 2023-09-11 18:36:40 +02:00
6170381bd7 Fix TextEdit.get_rect_at_line_column returning negative pos even though cursor is in viewable area of the control 2023-09-11 12:32:36 +02:00
7d69a5ba50 Fix sign(NAN) returning 1.
Fixes #79036. sign(NAN) now returns 0.
This should not impact performance much in any way.
Adds a test for the NAN case. Updates the documentation to clarify the new behavior.
2023-09-09 11:30:11 +02:00
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
22e2696767 Add unit tests for type_convert Variant utility function 2023-09-08 10:13:22 -05:00
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
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
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
19632eaf50 Change precedence in rules to make location after proper casing. 2023-09-05 16:16:21 +02:00
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
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
2b3bbde6da [String] Fix string conversion for -0.0 float values. 2023-09-05 11:32:55 +03:00
ab33613a13 Update and properly list versions of the built-in fonts. 2023-09-05 08:17:24 +03:00
4328ffcc79 Fix ThemeDB initialization in tests
Also fixes class name shadowing in Viewport/Window tests.
2023-09-04 18:07:16 +02:00
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
8edc0b43b9 Merge pull request #78634 from Sauermann/fix-notification-order
Fix `Object::notification` order
2023-08-30 08:44:36 +02:00
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
0045dc204c Revert "Implement loading DDS textures at run-time"
This reverts commit 34ab1c8a36.
2023-08-29 14:25:16 +02:00
67db4693eb Expose _validate_property() for scripting 2023-08-28 15:18:48 +02:00
75bc6866a4 Merge pull request #81037 from AThousandShips/openxr_register
Ensure OpenXR classes are declared properly
2023-08-28 12:09:47 +02:00
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
c23bd8b143 Ensure OpenXR classes are declared properly
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2023-08-28 09:37:04 +02:00
0954ed0283 Suppress expected errors in navi-related unit tests, #80616 2023-08-22 19:33:38 +02:00
07d859de25 [TextServer] Fix issues with character breaks, add more tests. 2023-08-19 11:49:34 +03:00
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
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
20e24bd2bb Merge pull request #78529 from Chaosus/string_reverse
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
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
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
5d3fcc5766 [TextServer] Fix system font fallback and caret/selection behavior for composite characters. 2023-08-15 11:42:40 +03:00