summaryrefslogtreecommitdiff
path: root/core/input
AgeCommit message (Collapse)Author
2021-10-18Merge pull request #53741 from DmitriySalnikov/exposed_sensor_setters_masterRémi Verschelde
2021-10-15SCons: List `.gen.cpp` sources explicitly to avoid globbing errorsRémi Verschelde
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp` extension, users run into build issues when switching between branches (i.e. switching before and after the name change/removal). This is because we glob `*.cpp` so if a now-obsolete file from a previous build is present, we'll include it too, potentially leading to bugs or compilation failure (due to missing headers or invalid code). So globbing patterns in `add_source_files` will now skip files ending with `.gen.cpp`, which should instead be passed explicitly where they're used.
2021-10-12Exposed setters for sensor values in Input classДмитрий Сальников
2021-10-04GDScript completion: Handle quote style ad-hoc to remove editor dependencyRémi Verschelde
`core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`.
2021-10-01Allow shortcuts to have any number of bindings. Updated UI as required.Eric M
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30InputEventJoypadMotion::set_axis - reject invalid axisLATRio
2021-09-28Replace auto completion shortcut for macfabriceci
2021-09-26validate 'shortcut' in InputEventShortcutLATRio
2021-09-21Improve implementation of builtin action overridesEric M
2021-09-15InputMap: Fixup `macos` feature tag overrides after #52291Rémi Verschelde
Fixes #52691.
2021-09-15Rename `osx` to `macos` in input map feature tag handlingHugo Locurcio
This follows the general feature tag rename for 4.0.
2021-09-13Merge pull request #50375 from Paulb23/code_edit_unit_testsRémi Verschelde
2021-09-01Fix InputMap and display server not nulling singleton on freePaulb23
2021-08-31Make platform feature tag names lowercaseHugo Locurcio
Feature tag names are still case-sensitive, but this makes built-in feature tags more consistent. - `Windows` -> `windows` - `OSX` -> `osx` - `LinuxBSD` -> `linuxbsd` - `Android` -> `android` - `iOS` -> `ios` - `HTML5` -> `html5` - `JavaScript` -> `javascript` - `UWP` -> `uwp`
2021-08-23Merge pull request #51750 from jmb462/inputmap_action_suggestionsMax Hilbrunner
Adding InputMap action error suggestions for Input singleton (Fix #51634)
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-16Adding InputMap action error suggestion for Input singletonjmb462
2021-08-16Fix input methods returning zero strength when pressed status not requestedMai Lavelle
Fixes behavior of these methods: `InputMap::event_get_action_status` `InputEvent*::action_match` Previously when `p_pressed` was `nullptr`, `p_strength` would be set to `0.0f` regardless of event strength. This affected `InputEventAction` events processed by `Input.parse_input_event` for example. Regression found in afa89c9eea5c99
2021-08-13Style: Cleanup code using `text_editor/completion/use_single_quotes`Rémi Verschelde
2021-08-13Add input buffering frameworkPedro J. Estébanez
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses. For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-13Improve input event accumulationPedro J. Estébanez
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag. - Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes). - Touch drag events now support accumulation.
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-08-09Added EditorCommandPaletteBhuvan Vemula
2021-08-07Fix action_get_events returning booleans instead of InputKey entriesJulien Nguyen
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-22Fix Input get_action_raw_strengthAaron Franke
2021-07-20Sync controller mappings DB with SDL2 community repoRémi Verschelde
Synced with gabomdq/SDL_GameControllerDB@241fed0a4425d1b7679e3d3d7abdd2a2cd7fa57c.
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-17[HTML5] Add 2 controllers to the godot database.Fabio Alessandrelli
Sony PlayStation DualShock 4 (054c:05c4 first gen). Unofficial Switch controller.
2021-07-06Added EditorInspectorPlugin to aid in editing InputEvents in resources and ↵Eric M
shortcuts
2021-07-02Add `get_dead_zone()` method to `InputMap`Nick H
This commit adds a new method to the `InputMap`, allowing the user to get the value of an action's dead zone as a float.
2021-06-20Use mouse and joypad enums instead of plain integersAaron Franke
Also MIDIMessage
2021-06-20Move many input enums to their own fileAaron Franke
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-20Merge pull request #48696 from madmiraal/fix-48692Rémi Verschelde
Fix `InputMap.action_erase_event()` failing to erase events correctly.
2021-06-16Documentation search fixesGregory Basile
Updates rich_text_label so that the built-in documentation can be searched Previously, it would only find the first result and would not select other results Renames "_entered" functions to "_submitted"
2021-06-15Added Input_Map entry for backspacing using Shift+BackspaceSpaghettiCoder01
2021-06-13Fix `InputEventJoypadButton::as_text` crash for invalid button indexHaoyu Qiu
2021-06-03Add MOUSE_MODE_CONFINED_HIDDENAaron Franke
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-01Move and expose AutoComplete in CodeEditPaulb23
2021-05-22Add a keyboard shortcut to select the word under cursor in TextEditHugo Locurcio
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-20Change behavior of String.rightTomasz Chabora
2021-05-20Fix typos with codespellRémi Verschelde
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-19Fix InputMap.action_erase_event() failing to erase events correctly.Marcel Admiraal
2021-05-17Merge pull request #48168 from LightningAA/control-to-ctrl-4.0Rémi Verschelde
2021-05-17Fix typo in InputEventMIDI stringfox
2021-05-15Make printing of InputEvents consistentMarcel Admiraal
- 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-07Rename "Control" key to "Ctrl" and add "_pressed" suffix to all ↵Lightning_A
InputEventWithModifiers properties/methods