aboutsummaryrefslogtreecommitdiff
path: root/main/input_default.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #17196 from RandomShaper/improve-gui-touchRémi Verschelde2018-05-021-3/+12
|\ | | | | Implement universal translation of touch to mouse (3.1)
| * Implement universal translation of touch to mousePedro J. Estébanez2018-04-301-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*) The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers. Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse. *: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest. On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction. Plus: Improve/fix tracking of current mouse position. ** Summary of changes to settings: ** - `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse` - New setting: `input/pointing_devices/emulate_mouse_from_touch`
* | Fix Coverity reports of uninitialized scalar variableRémi Verschelde2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
* | Merge pull request #16902 from groud/analog_action_systemJuan Linietsky2018-04-181-0/+2
|\ \ | |/ |/| Allow actions to provide an analog value
| * Allow actions to provide an analog valueGilles Roudiere2018-04-161-0/+2
| |
* | Implement Input.set_default_cursor_shape to change the default shapeGuilherme Felipe2018-04-101-0/+3
| | | | | | | | Closes #18043
* | Allow set_custom_mouse_cursor use same cursor(image) with different shapes.Guilherme Felipe2018-04-091-1/+0
|/
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursorRémi Verschelde2018-01-031-1/+1
|\ | | | | Custom hardware-accelerated mouse cursor
| * Add implementation for custom hardware cursorGuilherme Silva2017-12-171-1/+1
| |
* | Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Renamed fixed_process to physics_processAndreaCatania2017-09-301-1/+1
|
* Rename pos to position in user facing methods and variablesletheed2017-09-201-1/+1
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-1/+1
| | | | Fixes #10244.
* Removal of InputEvent as built-in Variant type..Juan Linietsky2017-05-201-2/+2
| | | | this might cause bugs I haven't found yet..
* Rename [gs]et_pos to [gs]et_position for ControlsSergey Pusnei2017-04-101-2/+2
| | | | | | | | Control set_pos -> set_position Control set_global_pos -> set_global_position [gs]et_mouse_pos -> [gs]et_mouse_position [gs]et_global_mouse_pos -> [gs]et_global_mouse_position fixes #8005
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Input: Remove usage of platform dependent event IDs.Andreas Haas2017-03-261-5/+5
| | | | | The ID property for InputEvents is set by `SceneTree` when sending the event down the tree. So there's no need for the platform specific code to set this value when it will later be overriden anyway...
* Implement warped mouse panning for 2D & 3D editorsPedro J. Estébanez2017-03-221-0/+1
| | | | | Enabled by default as in Blender, but can be disabled separately for 2D & 3D; the core functionality is in Input so this could be reused or even exposed to scripts in the future
* Input: bind parse_input_event()Andreas Haas2017-03-191-1/+2
| | | | | | | | | | When using get_tree().input_event(ev), the engine will JUST send the event down the SceneTree. However, you won't get any of the benefits of the Input singleton: - No InputMap actions will be emitted - The internal input state won't be modified, so methods like `Input.get_mouse_pos()` or `Input.is_joy_button_pressed` won't return the expected output after sending the event. This is fixed by using `Input.parse_input_event(ev)` instead. I guess we'll also have to update the docs to reflect that this is the preferred method of sending custom InputEvents.
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Better handling of joypad device IDs.Andreas Haas2017-02-261-0/+7
| | | | | | | Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself. This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code). For now, it's implemented for the main desktop platforms. Possible targets for future work: android, uwp, javascript
* Merge pull request #7127 from BastiaanOlij/ios_metersRémi Verschelde2017-01-151-0/+3
|\ | | | | Core motion implementation for iPhone (Accelerometer/Gyro/Magnetometer support)
| * Added support for getting gravity vector from iOSBastiaanOlij2017-01-121-0/+3
| |
* | rename Input.get_mouse_speed() to Input.get_last_mouse_speed()Juan Linietsky2017-01-131-1/+1
|/
* renamed joystick to joypad everywhere around source code!Juan Linietsky2017-01-081-5/+5
|
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-1/+1
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Add function to get readable names for joystick eventsAndreas Haas2016-09-201-0/+5
| | | | Closes #6476
* -Modified Input and added is_action_just_pressed() as well as ↵Juan Linietsky2016-09-011-9/+22
| | | | is_action_just_released()
* Added gyroscope support to Godot and AndroidJamil Halabi2016-07-161-0/+3
|
* Input: add get_connected_joysticks() method.Andreas Haas2016-07-051-0/+3
| | | | fixes #5465
* Set default duration parameter of joystick vibration to 0.Andreas Haas2016-06-211-1/+1
|
* Add missing license headers in our source files (#5255)Rémi Verschelde2016-06-181-0/+28
| | | Also removes a couple wrong Godot headers from third-party source files.
* Add joystick vibration support on Linux (#5043)Wilhem Barbier2016-06-151-0/+17
|
* Add magnetometer sensor support for Androidfluffrabbit2016-05-271-0/+3
|
* use joystick name from mapping-db if availablehinsbart2016-02-291-0/+1
|
* use fallback mapping from listHondres2016-01-271-1/+1
|
* can use fallback mapping on all platformshondres2016-01-241-2/+2
|
* support gamepad remapping on androidhondres2016-01-241-2/+2
|
* add mappings and increase max number of buttonshondres2016-01-221-2/+2
|
* Add some joystick functions to input. Enables manipulation of mappings at ↵hondres2016-01-081-0/+9
| | | | runtime
* Use tabs instead of spaces for new gamepad codehondres2015-12-181-32/+32
|
* Better gamepad supporthondres2015-12-181-5/+89
|
* Added ability to set custom mouse cursors. Not hardware accelerated yet.Juan Linietsky2015-09-241-0/+83