8812f0c896
Merge pull request #64444 from timothyqiu/action-completion
...
Fix action name completion for `Input`
2022-09-01 08:20:20 +02:00
d20b32186f
[Web] Rename JavaScript platform to Web.
...
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
d0a2a4c981
Merge pull request #64531 from madmiraal/fix-63972-2
...
Fix axis mapped to DPad buttons not releasing opposite button
2022-08-24 20:10:29 +02:00
1abdffe7a0
Replace Array return types with TypedArray 2
2022-08-23 23:21:32 +02:00
3f3ade9e5b
Merge pull request #64732 from RandomShaper/input_is_final
...
Consolidate the fact that `Input` is meant to be final
2022-08-23 08:53:49 +02:00
1a24c9e14b
Make _validate_property a multilevel method
2022-08-22 18:35:11 +03:00
99edd4b43d
Consolidate the fact that Input is meant to be final
...
This reverts #38034 and removes the `iteration()` method.
2022-08-22 14:37:25 +02:00
61be617571
Fix axis mapped to DPad buttons not releasing opposite button
2022-08-17 09:12:47 +01:00
660c700f9c
Fix action name completion for Input
2022-08-15 23:28:49 +08:00
e061b1cc3c
Use %s for bool value in vformat
2022-08-07 09:57:09 +08:00
86647c9e42
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@4896d2de6b
2022-08-05 02:59:03 +02:00
55845bac26
Fix some array size function definition mismatch.
2022-08-04 13:06:17 +02:00
90019676b0
Code quality: Fix header guards consistency
...
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
8823eae328
Rename OSX to macOS and iPhoneOS to iOS.
2022-07-21 09:37:52 +03:00
b70e4fc0f3
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@880abd09c9
2022-07-18 15:42:48 +02:00
344b42703b
Merge pull request #62212 from hansemro/eraser-detect-4
...
Add inversion/eraser-end property for tablet pens
2022-07-04 21:48:19 +02:00
6dcc9d1131
[macOS, Windows, X11] Add stylus inverted/eraser support to
...
InputEventMouseMotion event
2022-07-04 10:36:53 -07:00
00b3822306
Input: Re-enable input accumulation by default
...
I turned it off by mistake in #38697 .
See also #62664 for details on this boolean's complex history :)
2022-07-03 12:16:16 +02:00
0efa5d4cbd
Input: Make get_action_raw_strength print error when the action doesn't exist
2022-06-28 15:58:26 +02:00
4678736a39
Add suffixes to all nodes and resources
2022-06-11 09:41:05 -05:00
ecde7ce834
Merge pull request #61669 from fire-forge/input
...
Make Input `mouse_mode` and `use_accumulated_input` properties
2022-06-04 15:52:34 +02:00
f16c33fff6
Make Input mouse_mode and use_accumulated_input properties
2022-06-03 14:19:38 -05:00
3e53afd52c
Add array element type to get_connected_joypads
2022-06-03 20:37:46 +02:00
45af29da80
Add a new HashSet template
...
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
746dddc067
Replace most uses of Map by HashMap
...
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
8b7c7f5a75
Add a new HashMap implementation
...
Adds a new, cleaned up, HashMap implementation.
* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing ).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).
This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
30fbb8964d
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@b7d126eb71
2022-05-05 14:12:55 +02:00
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
...
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
c273ddc3ee
Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
...
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.
Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.
Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
5e4e4967fe
Use Input::push_input for tests plus extra mouse testing
2022-04-22 17:39:12 +01:00
bd9ba4bd10
Merge pull request #60208 from Magorx/input-set-custom-mouse-cursor-fix
...
Added p_shape check to avoid engine crash in DisplayServer
2022-04-14 00:12:51 +02:00
29a2809d21
Added p_shape check to avoid engine crush
2022-04-13 14:50:30 +03:00
f851c4aa33
Fix some issues found by cppcheck.
2022-04-06 14:34:37 +03:00
7119d355eb
String: Remove TTR and DTR defines in non-tools build
...
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
0494e024d8
Rename warp mouse functions to warp_mouse
2022-03-27 14:12:01 +02:00
ea20049afc
Ensure minimum modifiers are pressed when matching actions
2022-03-20 08:02:54 +00:00
d1ca29cd8c
Remove TTRC() with empty string
...
Fixes "duplicate message definition" when extracting messages.
2022-03-02 17:02:10 +08:00
e3d89a76f7
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@94b76208bc
2022-02-20 12:20:17 +01:00
b8a7ea034c
[HTML5] Add Stadia controller to database
...
Add web support for the Stadia controller.
2022-02-19 23:01:41 +01:00
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
...
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
bf0253bab9
Merge pull request #56764 from madmiraal/fix-45592-2
2022-02-03 18:10:30 +01:00
8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy
2022-01-29 04:41:03 -06:00
d74d4cbdff
Merge pull request #54173 from nathanfranke/fix-exact-match
2022-01-26 13:35:36 +01:00
dc1c4cfbfa
Fix action exact match
2022-01-24 05:55:37 -06:00
57a057f7ff
Merge pull request #56754 from madmiraal/fix-45592
2022-01-24 10:05:42 +01:00
5d17fe7d0f
Add Input.is_anything_pressed method
2022-01-20 20:55:14 +02:00
f41c72c538
Fix Actions mapped to triggers not using the full range
2022-01-14 15:36:20 +00:00
5c3600b29f
Fix mouse velocity not changing fast enough
...
- Uses all accumulated movements when calculating velocity
- Discards old accumulated movements
- Sets last mouse velocity to zero when there is no movement
2022-01-13 18:51:34 +00:00
5250cdd150
Use mouse event relative motion to calculate mouse velocity
2022-01-13 15:23:21 +00:00
46624388d4
Merge pull request #56322 from madmiraal/fix-42450
2022-01-11 11:33:59 +01:00