Commit graph

57 commits

Author SHA1 Message Date
Tomasz Chabora
13d7404cd7
Check for null in InputMap::_find_event
(cherry picked from commit f4e34ac353)
2020-09-24 14:43:08 +02:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Braden Bodily
71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Gilles Roudiere
f247832832 Add configurable strength value to InputEventAction 2019-06-02 14:31:34 +02:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
c9df3fbfdb
Merge pull request #21954 from isaacremnant/fix_inputs
Fix is_action_pressed for InputEventActions
2018-09-14 18:06:11 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
isaacremnant
bf16f89a30 Fix is_action_pressed for InputEventAction. 2018-09-10 15:15:06 -04:00
Poommetee Ketson
76adef2704 Fix arg name in docs, some copy-paste errors 2018-08-21 01:51:19 +07:00
AndreaCatania
c510e2586d Added method to clear input events of an action 2018-05-03 00:26:49 +02:00
groud
0aa8b35ee6 Fixing input strength and the impossibility to erase action events 2018-04-25 22:32:09 +02:00
Gilles Roudiere
ebfa731012 Allow actions to provide an analog value 2018-04-16 23:20:43 +02:00
Nibodhika
1e28f63bcf Allows to map an action to all devices.
This is accomplished by setting a special value (-1) to the device variable
in the InputEvent that's being used to compare with the one received from the OS.

This special value is invalid for a regular input, so it should be safe.
Implements #17942
2018-04-07 20:08:09 +00:00
Fabio Alessandrelli
920d2bfdfa Add two new default actions ui_end, ui_home
Used by Slider and Scrollbar
2018-02-23 13:01:28 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Ignacio Etcheverry
2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Bojidar Marinov
7b7c7c8dc0
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
2017-08-06 16:26:07 +03:00
Rémi Verschelde
76005a8e75 Style: Apply clang-format on all files
Thus fixing some invalid changes that had still made it to the master branch.
2017-07-30 22:53:40 +02:00
Juan Linietsky
25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Rémi Verschelde
c5ba9d9b7c Merge pull request #9703 from Noshyaar/docs
Add object type hint for docs
2017-07-19 10:00:20 +02:00
geequlim
5a2500f580 Fix errors with global config names no more sorrys please 2017-07-19 09:25:50 +08:00
Poommetee Ketson
49c7620326 Add object type hint for docs 2017-07-19 02:03:34 +07:00
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde
5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Juan Linietsky
de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Hein-Pieter van Braam
411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Fabio Alessandrelli
9100db7b94 Keyboard Input modifiers do not block actions.
This means, if you press "F" while holding "shift" and there is and
action registered for "F" that action should be pressed.
This commit restore this behaviour, lost when implementing
is_action_just_pressed.
If you want "blocking modifiers" you should code it via script.

Fixes 6826
2017-01-25 21:21:19 +01:00
Rémi Verschelde
f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
Rémi Verschelde
3890256fc5 Style: Cleanups, added headers, renamed files
Made sure files in core/ and tools/ have a proper Godot license header
when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h}
to rect3.{cpp,h} and class_db.{cpp,h} respectively.

Also added a proper header to core/io/base64.{c,h} after clarifying
the licensing with the original author (public domain).
2017-01-16 08:04:23 +01:00
Rémi Verschelde
93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky
547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
Juan Linietsky
0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
Juan Linietsky
118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to 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()
2017-01-02 23:03:46 -03:00
Rémi Verschelde
c7bc44d5ad Welcome in 2017, dear changelog reader!
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!
2017-01-01 22:03:33 +01:00
Fabio Alessandrelli
17d7e6a142 Fix Keyboard Input Hangs when using modifiers
Main input parsing loop only update actions for keyboard if the state has changed.
`InputMap::event_is_action` now ignores keyboard modifiers if the event is not pressed.
Clarify difference between `InputMap::action_has_event` and `InputMap::event_is_action` in docs.

Fixes #6388.
2016-10-19 17:52:49 +02:00
Andreas Haas
84783fe77b
Fix input action pressed state not changing for quick joystick movements.
fixes #6488
Also removes a bunch of dead code related to checking if a joystick axis is pressed.
2016-09-15 19:30:35 +02:00
Juan Linietsky
5b96c3a552 -Modified Input and added is_action_just_pressed() as well as is_action_just_released() 2016-09-01 18:59:46 -03:00
Andreas Haas
a9779efe82 fix ui_* input events in Editor
`input/` is the category for these in globals ^^
fixes #5050
2016-06-05 19:06:57 +02:00
Juan Linietsky
64fd75d91a Make Input Actions config not affect the editor 2016-06-05 01:19:42 -03:00
J08nY
1a80b2a04a
Added InputMap.get_actions()
get_actions() lists all actions in the InputMap.
2016-06-04 17:56:30 +02:00
Hinsbart
3b12f9ea82 add sign comparison for joystick axis events in InputMap::_find_event
fixes #4400
2016-04-22 16:36:45 +02:00
Hubert Jarosz
4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
hondres
9544042adb fix InputMap::action_erase_event()
fixes #3976
2016-03-07 19:00:17 +01:00
Juan Linietsky
3d0bd1a3f3 -make signals throw an error when target method is not found, fixes #2036
-removed 4 arguments limit for emit_signal() from script
-remvoed 4 arguments limit for call_deferred() from script
2016-01-04 09:35:21 -03:00