Commit graph

3915 commits

Author SHA1 Message Date
Hugo Locurcio 80f4e407b2
Add a keyboard shortcut to select the word under cursor in TextEdit
This also acts as a general-purpose "deselect" shortcut since pressing
it a second time will deselect text.

This is available both in the script editor and in TextEdit fields
in use, both in the editor and projects.

The Duplicate Line script editor shortcut was moved to Ctrl + Shift + D
since it conflicts with the new shortcut (Ctrl + D). The rationale for
doing so is that Duplicate Line is a less commonly used action, and
its behavior can be replicated by copying and pasting the current line
anyway. (With no selection active, the whole line will be copied.)
2021-05-22 23:47:43 +02:00
Rémi Verschelde de4c17f716
Merge pull request #48916 from mortarroad/master-convex-hull-ported
Replace QuickHull with Bullet's convex hull computer.
2021-05-22 23:22:48 +02:00
Morris Tabor d1bc88d426 Replace QuickHull with Bullet's convex hull computer.
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style.

Additional changes:
- extended PagedAllocator to allow leaked objects
- applied patch from https://github.com/bulletphysics/bullet3/pull/3037
2021-05-22 22:35:42 +02:00
Rémi Verschelde 5d2d24202d
Merge pull request #48927 from KoBeWi/I_fixed_your_left
Fix usage of String.left()
2021-05-22 13:09:34 +02:00
kobewi ea9660e1cf Fix usage of String.left() 2021-05-21 23:01:44 +02:00
Marcel Admiraal afdc5edb2a Remove alloca from loop and use a single fixed size array declaration 2021-05-21 13:04:55 +01:00
Rémi Verschelde 31246a58e0
Merge pull request #48806 from timothyqiu/xml-parser-fixes
Fix XMLParser behavior for comments and premature endings
2021-05-21 12:26:34 +02:00
Rémi Verschelde d5f9f58b61
Merge pull request #48903 from Calinou/math-funcs-remove-old-msvc-ifdef 2021-05-21 00:35:48 +02:00
Rémi Verschelde bfe4af91a2
Merge pull request #36180 from KoBeWi/I_broke_your_right
Change behavior of String.right
2021-05-20 23:56:17 +02:00
Hugo Locurcio b57d9c8005
Remove #ifdef catering to MSVC 2012 and earlier in math_funcs.h
For the `master` branch, the minimum supported MSVC version is now
MSVC 2017 (with MSVC 2019 being recommended).
2021-05-20 23:24:04 +02:00
Tomasz Chabora b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
Rémi Verschelde 98071ec136
Merge pull request #48887 from aaronfranke/round
Use global scope round method for rounding
2021-05-20 23:03:38 +02:00
Rémi Verschelde 342f3efc7e
Merge pull request #48882 from aaronfranke/approx-use-double
Make is_equal_approx have explicit float and double versions
2021-05-20 14:17:58 +02:00
Rémi Verschelde db4cf63482
Merge pull request #48860 from JohnM666/fix-basis-variant-initialization
Fix RigidBody3D.get_inverse_inertia_tensor() crash
2021-05-20 14:05:29 +02:00
Aaron Franke b01aa69c80
Use global scope round method for rounding 2021-05-20 07:29:35 -04:00
Rémi Verschelde 4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Aaron Franke b5b6d3a8ec
Make is_equal_approx have explicit float and double versions 2021-05-20 06:18:11 -04:00
JohnM666 b19544e91d Fix #46282 Executing RigidBody3D.get_inverse_inertia_tensor() crashes Godot 2021-05-20 10:46:24 +03:00
Marcel Admiraal 0846943ad5 Fix Quat includes 2021-05-19 15:09:21 +01:00
Haoyu Qiu 549ad70760 Fix XMLParser behavior for comments and premature endings 2021-05-18 15:01:21 +08:00
Rémi Verschelde 6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
Rémi Verschelde 7c72185917
Merge pull request #48792 from foxydevloper/fix-inputeventmidi-typo
Fix typo in InputEventMIDI string
2021-05-17 16:20:12 +02:00
fox df52f5de75 Fix typo in InputEventMIDI string 2021-05-17 09:54:28 -04:00
Pedro J. Estébanez 469fa47e06
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-17 15:06:19 +02:00
Marcel Admiraal 5cdf167dcc Make printing of InputEvents consistent
- Removes the undesired spaces before the colon
- Adds missing commas between parameters
- Adds quotes or brackets to strings
- Removes brackets around single values
2021-05-15 13:55:22 +01:00
Marcus Brummer 7e8e40a38e Fixed build with SCRIPT_AES256_ENCRYPTION_KEY set 2021-05-14 14:53:13 +02:00
Rémi Verschelde fcbf7145fe
Merge pull request #42337 from zaevi/fix-zip-open-twice
Fix zip file opening twice
2021-05-14 12:56:33 +02:00
Rémi Verschelde 08b4383e3f
SCons: Abort if SCRIPT_AES256_ENCRYPTION_KEY is invalid
Helps users figure out that something is wrong if they did define this
environment variable and it turns out being ignored.
2021-05-14 11:46:10 +02:00
Zae f403e62df1 Fix zip file opening twice 2021-05-14 13:53:43 +08:00
Rémi Verschelde ed11756d26
GDNative: Fix size mismatch on 32-bit platforms for Signal and Callable
Fixes #48645.
2021-05-11 20:25:01 +02:00
PouleyKetchoupp 3877ed73d0 Dynamic BVH broadphase in 2D & 3D Godot Physics
Port lawnjelly's dynamic BVH implementation from 3.x to be used in
both 2D and 3D broadphases.

Removed alternative broadphase implementations which are not meant to be
used anymore since they are much slower.

Includes changes in Rect2, Vector2, Vector3 that help with the template
implementation of the dynamic BVH by uniformizing the interface between
2D and 3D math.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2021-05-10 16:28:55 -07:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Rémi Verschelde c3f7465b7e
Merge pull request #48535 from groud/tiles_squashed
TileSet and TileMap rework (squashed)
2021-05-07 20:46:06 +02:00
Gilles Roudière a3dda2df85 Rework the TileSet resource and TileMap nodes:
- Move most properties from TileMap to TileSet,
- Make TileSet more flexible, supporting more feature (several
  collision layers, etc...),
- Fusion both the TileMap and TileSet editor,
- Implement TileSetSources, and thus a new way to index tiles in the TileSet,
- Rework the TileSet and TileMap editors completely,
- Implement an editor zoom widget (and use it in several places)
2021-05-07 18:06:17 +02:00
Rémi Verschelde bcbd480c32
Merge pull request #45144 from dalexeev/color-consts
Rename color constants (alternative)
2021-05-07 12:22:49 +02:00
Rémi Verschelde 8962d36bb1
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
2021-05-07 00:52:50 +02:00
Hugo Locurcio ce4aa07276
Implement the %command% placeholder in the Main Run Args setting
This can be used to tell Godot to run an executable that will run Godot
rather than running Godot directly. This is useful to make Godot start
on the dedicated GPU when using a NVIDIA Optimus setup on Linux:
`prime-run %command%`

The `editor/run/main_run_args` setting declaration was moved to make it
visible in the ProjectSettings documentation.
2021-05-07 00:05:02 +02:00
Rémi Verschelde 01f80201bf
Merge pull request #38645 from KoBeWi/FMR
Add filter, map and reduce to Array
2021-05-06 20:44:01 +02:00
Hugo Locurcio 3f078c99f6
Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
Hugo Locurcio e905e8f145
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
MaxStgs d89d7ecd08 Add PackedDataContainer data pointer check for non nullable 2021-05-05 21:17:49 +05:00
Tomasz Chabora c50acc7339 Add filter, map and reduce to Array 2021-05-05 15:54:57 +02:00
Rémi Verschelde 02e96d9748
Fix error handling for user-defined ResourceFormatLoader.load
See #48463.
2021-05-05 15:43:49 +02:00
Rémi Verschelde c9e874b62d
Merge pull request #48442 from akien-mga/posmod-int64_t
Re-bind posmod, use int64_t instead of int
2021-05-04 15:15:52 +02:00
Rémi Verschelde ea9cab3e76
Merge pull request #48430 from reduz/add-rpc-to-callable
Add RPC support to Callable
2021-05-04 14:07:21 +02:00
Rémi Verschelde e196733e88
Re-bind posmod, use int64_t instead of int
Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-04 13:25:08 +02:00
Aaron Franke 0de9a7d803
Rename doubleclick to double_click 2021-05-04 04:38:08 -04:00
Rémi Verschelde 6653ec7cfe
Merge pull request #48418 from KoBeWi/press_enter_to_complete
Add Enter as alternate key to complete code
2021-05-04 09:25:33 +02:00
reduz c76acf6890 Add RPC to Callable
-Up to each scripting language to implement this
-If not supported for the function, it will just error when you try to call
2021-05-03 19:21:37 -03:00
kobewi 76903d2c44 Add Enter as alternate key to complete code 2021-05-03 19:28:59 +02:00