aboutsummaryrefslogtreecommitdiff
path: root/core/bind/core_bind.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Expose OS.get_ticks_usec()Marc Gilleron2018-06-181-0/+6
|
* IME context detection.Saracen2018-06-111-0/+5
|
* Improve return value of OS.execute in blocking/non-blocking variantsRémi Verschelde2018-05-301-1/+2
| | | | | | | | | | | | | | Initialized the PID to -2, which will be the value returns in blocking- mode where the PID is not available. (-1 was already taken to signify an execution failure). OS::execute will now properly return a non-OK error code when it fails to execute the target file. The documentation was rewritten to be very clear about the differences between blocking and non-blocking mode. Fixes #19056.
* GDScript access to copyright, license, author and donor information.Ibrahn Sahir2018-05-191-0/+25
| | | | | | | | | Adds following functions to the Engine singleton: get_author_info - names of Godot authors get_copyright_info - detailed source copyright get_license_info get_donor_info - donor names get_license_info - full text of licenses used, indexed by license names get_license_text - the text of the Godot Expat license
* Merge pull request #14622 from bruvzg/non-rectangular-windowsHein-Pieter van Braam2018-05-081-0/+12
|\ | | | | Experimental support for windows with per-pixel transparency.
| * Experimental support for windows with per-pixel transparency (macOS, X11 and ↵bruvzg2018-04-071-0/+12
| | | | | | | | Windows).
* | Merge pull request #17353 from zmanuel/timer_hysteresis_multiframe_pr1Juan Linietsky2018-05-071-0/+11
|\ \ | | | | | | Use hysteresis for smoother physics update frequency
| * | Add hysteresis to physics timestep count per frameManuel Moos2018-04-091-0/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new class _TimerSync to manage timestep calculations. The new class handles the decisions about simulation progression previously handled by main::iteration(). It is fed the current timer ticks and determines how many physics updates are to be run and what the delta argument to the _process() functions should be. The new class tries to keep the number of physics updates per frame as constant as possible from frame to frame. Ideally, it would be N steps every render frame, but even with perfectly regular rendering, the general case is that N or N+1 steps are required per frame, for some fixed N. The best guess for N is stored in typical_physics_steps. When determining the number of steps to take, no restrictions are imposed between the choice of typical_physics_steps and typical_physics_steps+1 steps. Should more or less steps than that be required, the accumulated remaining time (as before, stored in time_accum) needs to surpass its boundaries by some minimal threshold. Once surpassed, typical_physics_steps is updated to allow the new step count for future updates. Care is taken that the modified calculation of the number of physics steps is not observable from game code that only checks the delta parameters to the _process and _physics_process functions; in addition to modifying the number of steps, the _process argument is modified as well to stay in expected bounds. Extra care is taken that the accumulated steps still sum up to roughly the real elapsed time, up to a maximum tolerated difference. To allow the hysteresis code to work correctly on higher refresh monitors, the number of typical physics steps is not only recorded and kept consistent for single render frames, but for groups of them. Currently, up to 12 frames are grouped that way. The engine parameter physics_jitter_fix controls both the maximum tolerated difference between wall clock time and summed up _process arguments and the threshold for changing typical_physics_steps. It is given in units of the real physics frame slice 1/physics_fps. Set physics_jitter_fix to 0 to disable the effects of the new code here. It starts to be effective against the random physics jitter at around 0.02 to 0.05. at values greater than 1 it starts having ill effects on the engine's ability to react sensibly to dropped frames and framerate changes.
* | Merge pull request #15943 from poke1024/geometry-line-lineJuan Linietsky2018-05-071-0/+11
|\ \ | | | | | | Add Geometry::line_intersects_line_2d()
| * | Add Geometry::line_intersects_line_2d()Bernhard Liebl2018-01-211-0/+11
| | |
* | | Change ".." punctuation for "..." in editor strings (#16507)Hugo Locurcio2018-04-221-1/+1
| | |
* | | Merge pull request #18227 from bojidar-bg/fix-date-unix-crashRémi Verschelde2018-04-181-7/+7
|\ \ \ | | | | | | | | Fix crash resulting from bad month check in core_bind.cpp
| * | | Fix crash resulting from bad month check in core_bind.cppBojidar Marinov2018-04-171-7/+7
| | |/ | |/| | | | | | | | | | Also, make it clear that day is 0-based. This might cause very slight differcies in existing games. Fixes #18221
* | | iPhone X support and iOS-related fixesRuslan Mustakov2018-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from April 2018 Apple no longer accepts apps that do not support iPhone X. For games this mainly means respecting the safe area, unobstructed by notch and virtual home button. UI controls must be placed within the safe area so that users can interact with them. This commit: - Adds OS::get_window_safe_area method that returns unobscured area of the window, where interactive controls should be rendered. - Reorganizes how launch screens are exported - the previous way was incorrect and modern iPhones did not pick up the correct screens and because of that used a non-native resolution to render the game. - Adds launch screen options for iPhone X. - Makes launch screens optional in the export template. If not specified, a white screen will be used. - Adds App Store icon (1024x1024) export option as it now has to be bundled with the app instead of being provided in iTunes Connect. - Fixes crash when launching games in iOS Simulator. It happened because controllerWasConnected callback came before the engine was initialized. Now in such case the controllers will be queued up and registered after initialization is done. - Fixes issue with the virtual keyboard where for some reason autocorrection panel would intersect with the keyboard itself and not allow you to use the top row of the keyboard. This is fixed by disabling autocorrection altogether. Closes #17358. Fixes #17428. Fixes #17331.
* | | Update classref and docs, fix missing parameters' namePoommetee Ketson2018-04-111-2/+2
|/ /
* | Added File.get_path and File.get_path_absolute functionsMarcelo Fernandez2018-03-131-0/+13
| |
* | Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez2018-03-041-0/+21
| |
* | Merge pull request #15564 from RandomShaper/adpod-topmostRémi Verschelde2018-02-141-0/+10
|\ \ | | | | | | Add new window setting: always on top
| * | Add new window setting: always on topPedro J. Estébanez2018-01-051-0/+10
| | | | | | | | | | | | Implemented for Windows and Linux.
* | | Added OS::center_window to center the window precisely on desktop platformsMarcelo Fernandez2018-02-121-0/+11
| |/ |/|
* | get_target_fps and set_target_fps now both use an intPaul Joannon2018-01-121-1/+1
| |
* | Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+23
| | | | | | | | | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* | Merge pull request #15337 from ↵Rémi Verschelde2018-01-081-0/+6
|\ \ | | | | | | | | | | | | touilleMan/fix-classdb_get_method_list-without-instrospection Fix _ClassDB::get_method_list when instrospection is disabled
| * | Fix _ClassDB::get_method_list to returns only what's available when ↵Emmanuel Leblond2018-01-041-0/+6
| | | | | | | | | | | | introspection is disabled
* | | Print error if a resource can't load from script, fixes #15313Juan Linietsky2018-01-051-1/+7
| |/ |/|
* | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #12603 from GodotExplorer/beautify-jsonRémi Verschelde2017-12-061-3/+3
|\ | | | | Add indent and sort keys support for JSON.print
| * Add indent and sort keys support for JSON.printGeequlim2017-11-071-3/+3
| |
* | Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde2017-11-171-3/+3
| | | | | | | | | | Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
* | Move singleton management from ProjectSettings to EngineLeon Krause2017-11-141-0/+13
| |
* | Basic docs for Geometry plus two new functionsBernhard Liebl2017-11-051-0/+12
|/
* Add Colemak keybindings to editor for osxN0hbdy2017-10-301-0/+1
|
* Merge pull request #11823 from endragor/virtual-keyboard-heightGilles Roudiere2017-10-041-0/+5
|\ | | | | Allow to obtain virtual keyboard height
| * Allow to obtain virtual keyboard heightRuslan Mustakov2017-10-041-0/+5
| | | | | | | | | | | | | | | | On mobile platforms virtual keyboards take up significant amount of screen space and UI containing a text box may need to be adjusted after the keyboard appears to keep the text box visible to user. This commit adds a way to obtain virtual keyabord height so that controls are aware of how much they need to move.
* | fixed the OS.has_feature() API, and added support for 32 and 64.Juan Linietsky2017-10-031-0/+7
| |
* | Merge pull request #11782 from eska014/persistent-userfs-testHein-Pieter van Braam2017-10-031-0/+6
|\ \ | |/ |/| Add OS::is_userfs_persistent, allow starting HTML5 platform in private mode
| * Add OS::is_userfs_persistent to check user:// persistenceLeon Krause2017-10-021-0/+6
| | | | | | | | Allows starting HTML5 export when IndexedDB is not available.
* | Renamed fixed_process to physics_processAndreaCatania2017-09-301-3/+3
|/
* Rename pos to position in user facing methods and variablesletheed2017-09-201-12/+10
| | | | | | | | | | | 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.
* Merge pull request #11294 from karroffel/json-objectThomas Herzog2017-09-171-0/+74
|\ | | | | added JSON singleton
| * added JSON singletonkarroffel2017-09-151-0/+74
| | | | | | | | | | There was no way to access JSON functionality in scripting languages apart from GDScript because the JSON class wasn't exposed to ClassDB.
* | Adds _OS::PowerState enumIgnacio Etcheverry2017-09-161-7/+7
|/
* Fix enums bindingsMaxim Sheronov2017-09-131-6/+6
| | | | | Add missed bindings for enums Move some enums to class to have correct output of api.json
* Fix typos 'a' and 'an'Poommetee Ketson2017-09-021-1/+1
|
* Fix signed and unsigned comparisonsHein-Pieter van Braam2017-09-011-1/+1
| | | | The first in my quest to make Godot 3.x compile with -Werror on GCC7
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-1/+1
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* Merge pull request #10487 from marcelofg55/curscr_as_defaultRémi Verschelde2017-08-221-3/+3
|\ | | | | p_screen param from get_screen_* funcs now default to the current screen
| * p_screen param from get_screen_* funcs now default to the current screenMarcelo Fernandez2017-08-211-3/+3
| |