Commit Graph

29639 Commits

Author SHA1 Message Date
Sergey Minakov
6e550e90bf GUI ScrollBar: possible fix for scrolling
Use of unmodified value returned by 'screen_is_touchscreen' to be used in determening if scroll bar should be scrolled
2020-07-25 21:54:56 +02:00
Meriipu
7f9bfee0ac GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.
2020-07-25 20:26:02 +02:00
Ignacio Etcheverry
ced77b1e9b C#: Switch games to MSBuild Sdks and .NET Standard
Godot.NET.Sdk
-------------

Godot uses its own custom MSBuild Sdk for game
projects. This new Sdk adds its own functionality
on top of 'Microsoft.NET.Sdk'.

The new Sdk is resolved from the NuGet package.

All the default boilerplate was moved from game
projects to the Sdk. The default csproj for
game project can now be as simple as:

```
<Project Sdk="Godot.NET.Sdk/4.0.0-dev2">
  <PropertyGroup>
    <TargetFramework>netstandard2.1</TargetFramework>
  </PropertyGroup>
</Project>
```

Source files are included by automatically so
Godot no longer needs to keep the csproj in sync
when creating new source files.

Define constants
----------------

Godot defines a list of constants for conditional
compilation. When exporting games, this list also
included engine 'features' and platform 'bits'.
There were a few problems with that:

- The 'features' constants were only defined when
  exporting games. Not when building the game for
  running in the editor player.
- If the project was built externally by an IDE,
  the constants wouldn't be defined at all.

The new Sdk assigns default values to these
constants when not built from the Godot editor,
i.e.: when built from an IDE or from the command
line. The default define constants are determined
from the system MSBuild is running on.

However, it's not possible for MSBuild to
determine the set of supported engine features.
It's also not possible to determine if a project
is being built to run on a 32-bit or 64-bit
Godot executable.

As such the 'features' and 'bits' constants had
to be removed.
The benefit of checking those at compile time
was questionable, and they can still be checked
at runtime.

The new list of define constants includes:

- GODOT
- GODOT_<PLATFORM>
  Defaults to the platform MSBuild is running on.
- GODOT_<PC/MOBILE/WEB>
- TOOLS
  When building with the 'Debug' configuration
  (editor and editor player).
- GODOT_REAL_T_IS_DOUBLE
  Not defined by default unless $(GodotRealTIsDouble)
  is overriden to be 'true'.

.NET Standard
-------------

The target framework of game projects was changed
to 'netstandard2.1'.
2020-07-25 19:22:01 +02:00
Rémi Verschelde
6f292f906e
Merge pull request #38900 from bruvzg/docs_ignore_os_spec_def_vals
Docs: Ignore OS specific values (constants, project settings, properties)
2020-07-25 18:54:25 +02:00
Rémi Verschelde
58bde149cc
Merge pull request #40698 from vnen/gscript-allow-new-call
Allow "new()" to be called in non-static functions
2020-07-25 18:36:19 +02:00
Rémi Verschelde
325af10d01
Merge pull request #40696 from Xrayez/scons-tests
SCons: Add `tests` option to enable or disable unit tests
2020-07-25 18:11:45 +02:00
Andrii Doroshenko (Xrayez)
f6465f46b4 SCons: Add tests option to enable or disable unit tests 2020-07-25 18:44:18 +03:00
Rémi Verschelde
5f75cec59e
Merge pull request #40640 from Xrayez/base-begins-with-local-err
Skip internal scripts for breakpoints without printing an error
2020-07-25 13:00:02 +02:00
Rémi Verschelde
46831b40e1
Merge pull request #40485 from Rubonnek/fix-nowarn-deferred-call
Show errors on Object.call_deferred
2020-07-25 12:37:20 +02:00
Rémi Verschelde
be083d5d0d
Merge pull request #40668 from SecretPanda420/patch-1
Remove Travis CI and AppVeyor build badge
2020-07-25 10:35:06 +02:00
Wilson E. Alvarez
1cd02ef600
Show errors on Object.call_deferred 2020-07-24 21:47:01 -04:00
Rémi Verschelde
963d3a07bd
Merge pull request #40610 from amanj120/forward_port_bundle_pr_manifest
Write AndroidManifest.xml file for Gradle project
2020-07-24 23:35:29 +02:00
Rémi Verschelde
79ac3bd01d
Merge pull request #40660 from SkyLucilfer/TTRFix
Fix TTR misuse
2020-07-24 22:44:58 +02:00
PouleyKetchoupp
a2dd966301 Fix virtual keyboard height regression
Disabling virtual keyboard focus adjustement caused get_keyboard_height
to always return 0 because it was calculated when the view is resized.

In order to fix it, a PopupWindow is now created on top of the main view
and is set for focus adjustments so the keyboard size can be calculated
based on this popup without affecting the main view.
2020-07-24 19:54:06 +02:00
George Marques
2b9d9bc364
Remove multilevel calls
In general they are more confusing to users because they expect
inheritance to fully override parent methods. This behavior can be
enabled by script writers using a simple super() call.
2020-07-24 14:13:58 -03:00
Aman Jain
e53067c42e Write an AndroidManifest.xml file to be merged with app module's manifest. 2020-07-24 12:53:27 -04:00
George Marques
e6b44b93c3
GDScript: Allow "new()" to be called in non-static functions 2020-07-24 13:45:23 -03:00
Secret Panda
9838f2ff93
Remove Travis CI and AppVeyor build badge
Travis CI and AppVeyor are phased out in 431930bd09 hence there is no point in keeping a badge of it in `README.md`
2020-07-24 22:11:57 +05:30
Rémi Verschelde
b7dc08fcf6
Merge pull request #40663 from bruvzg/fix-macos-arm64-build
[macOS] Fix build for ARM64.
2020-07-24 17:27:35 +02:00
bruvzg
09f301029a
[macOS / ARM64] Remove "-msse2" flag from ARM64 release export template build. Add ARM64 breakpoint inline assembly to "doctest". 2020-07-24 17:54:34 +03:00
Rémi Verschelde
5287124b72
Merge pull request #40661 from RevoluPowered/fix_argument_edit_doctest_pr
Fix godot not starting
2020-07-24 16:03:05 +02:00
Gordon MacPherson
a55b10a053 fix crash on shutdown 2020-07-24 14:48:14 +01:00
Gordon MacPherson
2bdbdc4702 Fix arguments always being found and returned some items back to normal 2020-07-24 14:16:02 +01:00
SkyJJ
280d4e2965 Fix TTR misuse 2020-07-24 15:15:23 +02:00
Rémi Verschelde
3f1fc5af7a
Merge pull request #40148 from RevoluPowered/unit-test-revamp
Added doctest unit test framework
2020-07-24 14:55:22 +02:00
Marcel Admiraal
236857c92a Ensure Bullet HeightMapShape3D data width and depth are at least 2. 2020-07-24 13:40:26 +01:00
RevoluPowered
579342810f t Add unit testing to Godot using DocTest and added to GitHub Actions CI
Implements exit codes into the engine so tests can return their statuses.
Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically.

Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header.

This lowers the complexity of running the unit tests and even for
physics should be possible to implement such a fix.
2020-07-24 13:05:33 +01:00
Rémi Verschelde
27d1209282
Merge pull request #38088 from YeldhamDev/name_tooltips_tweaks
Small naming and tooltip tweaks
2020-07-24 13:57:13 +02:00
Rémi Verschelde
513b39882a
Merge pull request #40436 from DanielZTing/master
Evenly distribute stretched Nodes in BoxContainer
2020-07-24 13:47:18 +02:00
Rémi Verschelde
93b50a62e3
Merge pull request #40652 from akien-mga/ci-more-cache-key
CI: Fix cache key and include base branch
2020-07-24 09:32:48 +02:00
Rémi Verschelde
2cf5ad9ea9 CI: Fix cache key and include base branch
The base branch is hardcoded as an env variable as I couldn't find a simple
way to just get either `3.2` or `master`. But it's easy to change when we
branch off from `master` to a new stable branch, which doesn't happen often.

(There's `{{github.base_ref}}` but it's probably more verbose like
`ref/heads/master`, and only valid for PRs.)
2020-07-24 08:28:43 +02:00
Rémi Verschelde
422a2da8c7
Merge pull request #40648 from RevoluPowered/github_actions_cache_fixes
GitHub actions cache fixes
2020-07-24 07:30:26 +02:00
Michael Alexsander
5643d2e3fe Small naming and tooltip tweaks 2020-07-23 20:17:43 -03:00
Gordon MacPherson
afdce1e30c Improve the cache keys to prevent clashes for the wrong type of build 2020-07-24 00:15:23 +01:00
Gordon MacPherson
3c07d0ff32 Clamp scons cache to 4096 MB 2020-07-24 00:14:03 +01:00
Rémi Verschelde
3811fb919e
Merge pull request #40598 from vnen/gdscript-2.0
GDScript 2.0 (again)
2020-07-24 01:04:57 +02:00
Rémi Verschelde
819ef12d68
Merge pull request #40646 from akien-mga/ci-gh-action-linux-mono
CI: Add Mono support to Linux builds on GitHub Actions
2020-07-24 00:55:09 +02:00
Rémi Verschelde
b5ad6fa22c CI: Drop Travis CI config, replaced by GitHub Actions 2020-07-24 00:29:11 +02:00
Rémi Verschelde
0e294e6d25 CI: Add Mono support to Linux builds on GitHub Actions
Mono seems to be preinstalled in the build environment \o/
2020-07-24 00:29:11 +02:00
Rémi Verschelde
8beb5f277d
Merge pull request #40644 from akien-mga/ci-gh-action-javascript
CI: Add GitHub Action build for JavaScript
2020-07-24 00:28:38 +02:00
Rémi Verschelde
cc530fdbe4 CI: Add GitHub Action build for JavaScript
Uses mymindstorm/setup-emsdk to install Emscripten and set up
caching for Emscripten's generated system libraries.
2020-07-24 00:06:34 +02:00
Rémi Verschelde
b642e430ce
Merge pull request #40643 from KoBeWi/key_keeper
Keep transition value when replacing key
2020-07-24 00:03:43 +02:00
Rémi Verschelde
c853dd5ddb
Merge pull request #40632 from asmaloney/macos-maya-scroll
[macOS] Fix Maya navigation with ALT + mouse scroll
2020-07-23 23:39:31 +02:00
Tomasz Chabora
e1a1bb0a6e Keep transition value when replacing key 2020-07-23 22:59:04 +02:00
Rémi Verschelde
3c6f5226f7
Merge pull request #40635 from KoBeWi/🏃
Fix run project when current scene was never saved
2020-07-23 22:31:01 +02:00
Rémi Verschelde
cc1529abae
Merge pull request #40437 from thebestnom/Android-Template-github-action
Github Action for Android Template
2020-07-23 21:58:08 +02:00
Rémi Verschelde
f5091681b4
Merge pull request #40639 from KoBeWi/fix_emoji🎉🎉
Fix emoji branch compilation error
2020-07-23 21:55:07 +02:00
Andrii Doroshenko (Xrayez)
1c70a33d9c Skip internal scripts for breakpoints without printing an error
This removes:
```
ERROR: get_breakpoints: Condition ' base.begins_with("local://")
```
while running a project with blank scripts caused by deleting
or moving, or built-in scripts which are not yet saved within a scene
on running a project.
2020-07-23 20:51:17 +03:00
Tomasz Chabora
2407562366 Fix emoji branch compilation error 2020-07-23 19:42:37 +02:00
Tomasz Chabora
9c84e34fd4 Fix run project when current scene was never saved 2020-07-23 18:51:32 +02:00