summaryrefslogtreecommitdiffstats
path: root/platform/javascript/os_javascript.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement universal translation of touch to mousePedro J. Estébanez2018-04-301-35/+0
| | | | | | | | | | | | | | | | | | | 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`
* Refactor JavaScript platform build scriptLeon Krause2018-03-261-8/+11
|
* Check only for WebGL 1.0, move test to HTML fileLeon Krause2018-03-151-0/+1
| | | | | | | | Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after reading project settings, so check for the lower version. The test is now in the HTML file, so if desired WebGL 2.0 can be checked early by changing the behaviour there.
* Reinstate WebGL 1.0 driver in HTML5 platformLeon Krause2018-03-071-6/+23
|
* Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez2018-03-041-1/+2
|
* Fix HTML5 JS API setResizeCanvasOnStartLeon Krause2018-01-241-8/+3
|
* Fix HTML5 feature tagsLeon Krause2018-01-121-8/+19
| | | | | | | 'HTML5' is the platform tag, the 'JavaScript' tag indicates availability of the JavaScript.eval singleton. Also report texture compression support.
* Merge pull request #15422 from eska014/html5-loggerRémi Verschelde2018-01-071-0/+5
|\ | | | | Print without color control sequences in HTML5 platform
| * HTML5: Print without color control sequencesLeon Krause2018-01-071-0/+5
| |
* | Fix internal Emscripten JS API callsLeon Krause2018-01-061-3/+3
|/ | | | Emscripten 1.37.24 no longer exports these by default
* Add missing method for javascriptGuilherme Silva2018-01-051-0/+3
|
* 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.
* Fix macOS and other builds after #15299Duy-Nguyen TA2018-01-041-1/+1
| | | | Commit ammended by @akien-mga to fix more platforms.
* Change OS::initialize signature to return Error (fix segfault on x11)Emmanuel Leblond2018-01-041-2/+4
|
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix inverted relative mouse motion in HTML5 exportLeon Krause2017-11-291-2/+2
|
* Return and repair file loggingRuslan Mustakov2017-11-211-4/+0
| | | | And make it configurable, too.
* Merge pull request #12988 from akien-mga/xdg-home-pathsRémi Verschelde2017-11-201-5/+5
|\ | | | | Add support for XDG Base Directory spec
| * Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde2017-11-171-5/+5
| | | | | | | | | | Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
* | Merge pull request #13044 from eska014/enginejsRémi Verschelde2017-11-191-16/+14
|\ \ | | | | | | Change HTML5 start-up API
| * | Change HTML5 start-up APILeon Krause2017-11-191-16/+14
| |/ | | | | | | | | | | | | | | Rename engine.start() to startGame(), new start() takes string arguments handed directly to main(). Rename Engine.loadEngine() to load(). Add setLocale(), setResizeCanvasOnStart(), setExecutableName() and preloadFile().
* / Facilitate exposing platform-exclusive interfaces to all platformsLeon Krause2017-11-181-5/+0
|/ | | | | | | | | | | This makes the interfaces available, without implementation, in other platforms and the editor, which facilitates documenting platform-exclusive classes. Platform-exclusive APIs must be set up in platform/<platform>/api/api.cpp. Provide noop method-implementations where necessary. Also setup and document the HTML5 platform's JavaScript singleton.
* Move singleton management from ProjectSettings to EngineLeon Krause2017-11-141-3/+2
|
* Fix HTML5 mouse button release eventsLeon Krause2017-11-131-3/+4
|
* Make video mode initialization more intuitive, fixes #12022Juan Linietsky2017-11-091-5/+0
|
* Implemented physics plugAndreaCatania2017-11-041-5/+0
| | | | | | | | | | | | | | | | | | | | Moved init_physics Implemented physics 2D plug Fix clang Fix clang Fix static check Fix clang Fix static check Moved physics server initialization Moved physics server settings initialization
* Merge pull request #11782 from eska014/persistent-userfs-testHein-Pieter van Braam2017-10-031-5/+16
|\ | | | | Add OS::is_userfs_persistent, allow starting HTML5 platform in private mode
| * Add OS::is_userfs_persistent to check user:// persistenceLeon Krause2017-10-021-5/+16
| | | | | | | | Allows starting HTML5 export when IndexedDB is not available.
* | Extract logging logicRuslan Mustakov2017-09-251-0/+4
|/ | | | | | | | | | | | | | | | | | | Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors.
* Fix mouse button state in HTML5 platformLeon Krause2017-09-191-8/+8
| | | | Regression from 844c5e12e664e3212feacc9ee3200e116556fbc7
* Merge pull request #11252 from marcelofg55/fix_noaudio_crashRémi Verschelde2017-09-171-5/+1
|\ | | | | Fix crash when no audio driver is available
| * Fix crash when no audio driver is availableMarcelo Fernandez2017-09-131-5/+1
| |
* | Fix enums bindingsMaxim Sheronov2017-09-131-1/+1
|/ | | | | Add missed bindings for enums Move some enums to class to have correct output of api.json
* Merge pull request #10914 from eska014/html5-main-notifRémi Verschelde2017-09-031-15/+16
|\ | | | | Prevent sending MainLoop notifications before initialized
| * HTML5: Prevent sending MainLoop notifications before initializedLeon Krause2017-09-031-15/+16
| |
* | Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|/
* p_screen param from get_screen_* funcs now default to the current screenMarcelo Fernandez2017-08-211-2/+0
|
* removed calls to cursor_set_visible on all platforms fixes #10167toger52017-08-081-1/+1
|
* Merge pull request #10105 from eska014/html5-touch-hintRémi Verschelde2017-08-071-1/+5
|\ | | | | Implement OS.has_touchscreen_ui_hint() in HTML5 platform
| * Implement touch-screen check in HTML5 platformL. Krause2017-07-281-1/+5
| |
* | Improve HTML5 canvas managementL. Krause2017-08-051-49/+66
|/ | | | | | - set_window_maximized hides page content - Fix sporadic full-screen render-size bug in Chromium - Smoother resizing for maximized canvas
* Merge pull request #9770 from eska014/html5-focusRémi Verschelde2017-07-231-29/+88
|\ | | | | Implement input focus behavior in HTML5
| * Implement input focus behavior in HTML5L. Krause2017-07-221-29/+88
| | | | | | | | | | | | - Key and mouse events are only consumed if canvas is focused - NOTIFICATION_WM_MOUSE_ENTER, _MOUSE_EXIT, _FOCUS_IN and _FOCUS_OUT are emitted
* | -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-3/+8
|/ | | | -Added system for feature overrides, it's pretty cool :)
* Update HTML5 platform for new InputEventsL. Krause2017-06-191-95/+96
|
* Removal of InputEvent as built-in Variant type..Juan Linietsky2017-05-201-60/+60
| | | | this might cause bugs I haven't found yet..
* Merge pull request #8625 from eska014/html5-cursorshapeRémi Verschelde2017-05-051-3/+32
|\ | | | | HTML5: Cursor style control
| * Implement cursor style control in HTML5 platformL. Krause2017-05-021-3/+32
| |
* | Merge pull request #8574 from eska014/html5-noglutRémi Verschelde2017-05-021-8/+10
|\ \ | |/ |/| Remove GLUT usage in HTML5 platform
| * Remove GLUT usage in HTML5 platformL. Krause2017-04-281-8/+10
| |