Commit Graph

4588 Commits

Author SHA1 Message Date
Rémi Verschelde 5ffee633cd
Merge pull request #56028 from madmiraal/revert-55978-fix-switch-controller-event-spam 2021-12-21 09:44:59 +01:00
great90 10c91f8116
Fix variable name 'max_size' to 'min_size' in aabb 2021-12-19 11:51:14 +08:00
Marcel Admiraal 39136ce3e0
Revert "Fixed event spam when using the Nintendo Switch controller" 2021-12-17 17:14:07 +00:00
Haoyu Qiu 1fb59d13c2 Fix font preview text color on light background 2021-12-18 00:34:28 +08:00
Rémi Verschelde ed395c6b99
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@265b43b789.
2021-12-17 00:14:44 +01:00
Rémi Verschelde 9c9cc1b222
Merge pull request #55978 from slouken/fix-switch-controller-event-spam
Fixed event spam when using the Nintendo Switch controller
2021-12-16 19:49:47 +01:00
Sam Lantinga 313815f818 Fixed event spam when using the Nintendo Switch controller
There is no filtering on the Nintendo Switch Pro controller thumbstick, so there will frequently be events with very slight change. These are turned into "not pressed" events, which cancel "pressed" events from keys and buttons.

This change filters out up to 5% jitter, but it might be worth revisiting whether "not pressed" events should cancel "pressed" events.
2021-12-16 09:04:58 -08:00
Haoyu Qiu e4e4e475f8 Make `--doctool` locale aware
* Adds `indent(str)` to `String`:
    * Indent the (multiline) string with the given indentation.
    * This method is added in order to keep the translated XML correctly
      indented.
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`.
    * This will be used from both `EditorSettings` and the doc tool from
      `main`.
* Makes use of doc translation when generating XML class references, and
  setup the translation locale based on `-l LOCALE` CLI parameter.

The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 17:49:22 +08:00
Fabio Alessandrelli f9c05333ef
Merge pull request #55657 from MorganKF/patch-multiplayer-peer-extension
Patch `MultiplayerPeerExtension` to allow derived classes
2021-12-15 11:40:52 +01:00
Xavier Sellier ba0abd399f
Defer the call to 'popup_str' to the next cycle to let Godot Engine's editor time to properly start 2021-12-14 20:08:19 +01:00
MorganKF 44b35c3759 Update MultiplayerPeerExtension class registration to non-virtual
Fix formatting
2021-12-11 11:05:03 -03:30
raphaelazev 82527df55c Added check to get_all_locales to avoid adding duplicate locales to array 2021-12-10 19:25:59 -03:00
Tomasz Chabora d04c2a554f Improve Directory content navigation 2021-12-10 17:24:04 +01:00
Rémi Verschelde 03e105f677
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@348cfa347f.
2021-12-10 10:59:30 +01:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke 41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Rémi Verschelde 46d384060e
Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusive 2021-12-07 14:00:59 +01:00
Fabio Alessandrelli 3ae8eda1ed
Merge pull request #55603 from Calinou/add-os-crash-method
Add an `OS.crash()` method for testing system crash handler
2021-12-06 16:34:15 +01:00
Rémi Verschelde 1f5a3ba0ba
Merge pull request #55661 from KoBeWi/joys_of_connection 2021-12-06 14:03:01 +01:00
Rémi Verschelde 5baf20e638
Merge pull request #34005 from aaronfranke/minmax 2021-12-06 14:01:45 +01:00
Rémi Verschelde 608c9f8203
Merge pull request #47257 from timothyqiu/http-client-proxy 2021-12-06 13:30:53 +01:00
kobewi cb2bdcd286 Unexpose joy_connection_changed method 2021-12-06 13:10:17 +01:00
Hugo Locurcio 5761b90f3c
Add an `OS.crash()` method for testing system crash handler
This makes it possible to test the system's crash handler without
having to modify engine code or exploit an engine bug.
2021-12-03 22:11:46 +01:00
Yuri Sizov b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
Rémi Verschelde aaabc0abcc
Merge pull request #55520 from pycbouh/docs-sort-group-newline-theme-and-enums 2021-12-03 15:29:29 +01:00
Rémi Verschelde 8762d8fa5d
Merge pull request #55470 from groud/move_godot_object_init_to_extension 2021-12-03 14:41:07 +01:00
Aaron Franke 24f57886d0
Expose max_axis_index and max_axis_index for Vector2(i)
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
2021-12-02 23:45:41 -06:00
Rémi Verschelde 892a5a72cd
Merge pull request #55474 from akien-mga/copy-operators-no-reference 2021-12-02 17:34:45 +01:00
Max Hilbrunner 837e6bdf18
Merge pull request #37626 from aaronfranke/rect2-warnings
Print warnings when using a Rect2 or AABB with a negative size
2021-12-02 14:41:02 +01:00
Rémi Verschelde 49d8925713
Merge pull request #47294 from sebastian-heinz/patch-1 2021-12-02 10:04:17 +01:00
Rémi Verschelde 02d6cbfd8c
Merge pull request #38604 from Calinou/astar-rename-get-point-ids 2021-12-02 09:35:57 +01:00
sebastian-heinz be90aadbcd allow variant construction in expressions 2021-12-02 15:30:10 +08:00
Raul Santos a367378f9e Rename Vector parameters to be consistent
Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
2021-12-01 21:14:46 +01:00
Yuri Sizov 397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
Aaron Franke 9687f6fca3
Warn when using an AABB or Rect2 with a negative size 2021-11-30 18:27:58 -06:00
Hugo Locurcio 89849a9ed9
Rename `AStar.get_points()` to `AStar.get_point_ids()` for clarity
The same has been done for AStar2D as well.
2021-11-30 22:14:39 +01:00
Gilles Roudière 4fc0fb826a Change gdnative interface so that Godot object initialization should be triggered from the extension side 2021-11-30 16:55:48 +01:00
Rémi Verschelde 7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Marcel Admiraal 272b3c3728 Enable sorting of operator methods in class documentation. 2021-11-29 14:51:44 +00:00
Nathan Franke dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Ricardo Subtil 93396b3e51 Fix wrong comparison with default values 2021-11-26 14:04:13 +00:00
Yuri Roubinsky a4b7de6b23 Fix console colors on Windows 2021-11-26 13:10:55 +03:00
Aaron Franke 40cb86ba96
Don't show errors when getting nonexistent settings 2021-11-25 08:23:42 -06:00
Aaron Franke 9851d3c5b2
Move logic for saving project features to ProjectSettings save_custom 2021-11-25 03:08:05 -06:00
Aaron Franke e81c689592
Project feature warning system 2021-11-24 10:32:07 -06:00
Rémi Verschelde b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect 2021-11-24 16:34:01 +01:00
Haoyu Qiu c09ea8d45a Adds proxy support for HTTPClient
Also fixed a potential infinite loop when connecting to server.
2021-11-24 14:36:42 +08:00
Lightning_A e078f970db Rename `remove()` to `remove_at()` when removing by index 2021-11-23 18:58:57 -07:00
kleonc 92ca300ab1 Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()
Co-authored-by: Lightning_A <aaronjrecord@gmail.com>
2021-11-23 18:06:26 +01:00
kleonc 91595b16e3 Add Image::fill_rect method 2021-11-23 18:06:23 +01:00