Age | Commit message (Collapse) | Author |
|
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb.
There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
|
|
Print suggestions when requesting a nonexistent InputMap action
|
|
Co-authored-by: Marc Gilleron <marc.gilleron@gmail.com>
|
|
|
|
Synced with gabomdq/SDL_GameControllerDB@01dce71403e93eb699cc156f3237725863f0105a.
|
|
Synced with gabomdq/SDL_GameControllerDB@807ac1fbf9352da30ecbef869eced4a5bbf3c13e.
|
|
|
|
|
|
|
|
|
|
Fixed 'nonexistent action' errors spammed at startup on OSX
|
|
|
|
Thow errors if requesting an unexisting InputMap action.
Makes `Input.is_action_*` methods consistents with `Event.is_action_*` which already throw errors.
fixes #33303
|
|
That's the most common one we've been using for the general editor, and while the script editor
also supports Ctrl+Y, it should have lower priority.
In theory this code should make both be supported the same but for some reason the general editor
only seems to use the first entry (the script editor does support both).
|
|
And fix various bogus bindings following previous PRs.
|
|
This removes hardcoded actions from things like LineEdit and TextEdit.
Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
|
|
This adds the ability to add overrides for built-in actions (i.e. ui_*) in the editor. Also added a number of additional built-in actions for various text-related actions, gui-generic actions (like copy and paste) and graph-related actions (duplicate nodes), etc. Moved the definition of input actions to input_map, rather than in project_settings so the editor can make use of these actions as well.
|
|
|
|
EricEzaM/PR/fix-action-false-positives-and-allow-checking-exact-matches
Allow checking for exact matches with Action events.
|
|
Synced with gabomdq/SDL_GameControllerDB@f72b68b8b090e689ed21f600e89db9a661edb696.
Partial revert of #45790.
|
|
Add support for new SDL gamecontroller keywords.
|
|
|
|
We don't support 'misc1' as an output string yet (seems used for PS5 controller).
Yet another broken CSV line with 'CO.,LTD'.
|
|
Add some HTML5 controllers mapping.
|
|
|
|
Synced with gabomdq/SDL_GameControllerDB@c7cf1397c1e07182de936e72fa1bc5cc22ab8cc1.
|
|
No longer use emscripten functions for gamepads, implement them as
library functions in library_godot_display.js instead.
This allows us to do a better job at "guessing" vendorId, productId, OS,
etc. thus allowing us to better find the remapping for the controller.
|
|
In the core input handling code we have checks to make sure that if axis
rapidly change sign we inject mid-points to release any pending inputmap
action.
The function though, did not correctly insert the mid-point causing
dpads mapped to an axis that behaves like tri-state buttons (-1,0,1) to
not be released correctly.
This commit fixes that by including in the check the case where the axis
swtiches from abs(1) to 0.
|
|
Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
|
|
Rename MainLoop methods to match Node methods
|
|
|
|
|
|
Added additional param to action related methods to test for exactness.
If "p_exact_match" is true, then the action will only be "matched" if the provided input event *exactly* matches with the action event.
Before:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* Is Action Pressed = True
Now:
You can still do the above, however you can optionally check that the input is exactly what the action event is:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* p_exact_match = True
* Is Action Pressed = False
* If the Input Event was only KEY_S, then the result would be true.
Usage:
```gdscript
Input.is_action_pressed(action_name: String, exact_match: bool)
Input.is_action_pressed("my_action", true)
InputMap.event_is_action(p_event, "my_action", true)
func _input(event: InputEvent):
event.is_action_pressed("my_action", false, true) # false = "allow_echo", true = "exact_match"
event.is_action("my_action", true)
```
|
|
|
|
InputEvent as_text now returns readable string. Added to_string for debug strings
|
|
|
|
strings
Made InputEvent as_text() return a readable and presentable string. Added to_string() overrides for each which returns a 'debug-friendly' version which is not as presentable but provides more information and in a more structured fashion. Use as_text() for UI display scenarions and to_string() for debug cases
|
|
Update joy button and stick names, enums and documentation
|
|
|
|
Made serialization of Command toggleable when saving InputEvents.
|
|
Made serialization of Command optional. If command is serialized, Control (On Win/Linux) or Meta (on Mac) are not.
Example use case: You are on Windows and you set a shortcut to be Control + E. This would serialize as Command=true and Control=true. If you then run this project on Mac, you would need to press Command AND Control to activate the shortcut - which is not what is intended. Now, you can set store_command to true, and it will only serialize to Command = true (no Control serialized). On Windows, this means Control. On Mac, it means only command.
|
|
load_from_globals() -> load_from_project_settings()
|
|
|
|
|
|
Remove unneeded filter on joy_axis()
|
|
Allow getting Input "axis" and "vector" values by specifying multiple actions
|
|
|
|
For get_vector, use raw values and handle deadzones appropriately
|
|
|
|
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
|