summaryrefslogtreecommitdiff
path: root/platform/javascript/os_javascript.cpp
AgeCommit message (Collapse)Author
2018-05-10Merge pull request #18753 from eska014/html5-iframefocusMax Hilbrunner
Fix keyboard focus lock-out with HTML5 canvas in iframe
2018-05-10Fix keyboard focus lock-out with HTML5 canvas in iframeLeon Krause
2018-05-10Fix relative mouse motion when captured in HTML5 platformLeon Krause
2018-04-30Implement universal translation of touch to mousePedro J. Estébanez
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`
2018-03-26Refactor JavaScript platform build scriptLeon Krause
2018-03-15Check only for WebGL 1.0, move test to HTML fileLeon Krause
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.
2018-03-07Reinstate WebGL 1.0 driver in HTML5 platformLeon Krause
2018-03-04Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez
2018-01-24Fix HTML5 JS API setResizeCanvasOnStartLeon Krause
2018-01-12Fix HTML5 feature tagsLeon Krause
'HTML5' is the platform tag, the 'JavaScript' tag indicates availability of the JavaScript.eval singleton. Also report texture compression support.
2018-01-07Merge pull request #15422 from eska014/html5-loggerRémi Verschelde
Print without color control sequences in HTML5 platform
2018-01-07HTML5: Print without color control sequencesLeon Krause
2018-01-06Fix internal Emscripten JS API callsLeon Krause
Emscripten 1.37.24 no longer exports these by default
2018-01-05Add missing method for javascriptGuilherme Silva
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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-04Fix macOS and other builds after #15299Duy-Nguyen TA
Commit ammended by @akien-mga to fix more platforms.
2018-01-04Change OS::initialize signature to return Error (fix segfault on x11)Emmanuel Leblond
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-11-29Fix inverted relative mouse motion in HTML5 exportLeon Krause
2017-11-21Return and repair file loggingRuslan Mustakov
And make it configurable, too.
2017-11-20Merge pull request #12988 from akien-mga/xdg-home-pathsRémi Verschelde
Add support for XDG Base Directory spec
2017-11-19Merge pull request #13044 from eska014/enginejsRémi Verschelde
Change HTML5 start-up API
2017-11-19Change HTML5 start-up APILeon Krause
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().
2017-11-18Facilitate exposing platform-exclusive interfaces to all platformsLeon Krause
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.
2017-11-17Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde
Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
2017-11-14Move singleton management from ProjectSettings to EngineLeon Krause
2017-11-13Fix HTML5 mouse button release eventsLeon Krause
2017-11-09Make video mode initialization more intuitive, fixes #12022Juan Linietsky
2017-11-04Implemented physics plugAndreaCatania
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
2017-10-03Merge pull request #11782 from eska014/persistent-userfs-testHein-Pieter van Braam
Add OS::is_userfs_persistent, allow starting HTML5 platform in private mode
2017-10-02Add OS::is_userfs_persistent to check user:// persistenceLeon Krause
Allows starting HTML5 export when IndexedDB is not available.
2017-09-25Extract logging logicRuslan Mustakov
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.
2017-09-19Fix mouse button state in HTML5 platformLeon Krause
Regression from 844c5e12e664e3212feacc9ee3200e116556fbc7
2017-09-17Merge pull request #11252 from marcelofg55/fix_noaudio_crashRémi Verschelde
Fix crash when no audio driver is available
2017-09-13Fix crash when no audio driver is availableMarcelo Fernandez
2017-09-13Fix enums bindingsMaxim Sheronov
Add missed bindings for enums Move some enums to class to have correct output of api.json
2017-09-03Merge pull request #10914 from eska014/html5-main-notifRémi Verschelde
Prevent sending MainLoop notifications before initialized
2017-09-03HTML5: Prevent sending MainLoop notifications before initializedLeon Krause
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-21p_screen param from get_screen_* funcs now default to the current screenMarcelo Fernandez
2017-08-08removed calls to cursor_set_visible on all platforms fixes #10167toger5
2017-08-07Merge pull request #10105 from eska014/html5-touch-hintRémi Verschelde
Implement OS.has_touchscreen_ui_hint() in HTML5 platform
2017-08-05Improve HTML5 canvas managementL. Krause
- set_window_maximized hides page content - Fix sporadic full-screen render-size bug in Chromium - Smoother resizing for maximized canvas
2017-07-28Implement touch-screen check in HTML5 platformL. Krause
2017-07-23Merge pull request #9770 from eska014/html5-focusRémi Verschelde
Implement input focus behavior in HTML5
2017-07-22Implement input focus behavior in HTML5L. Krause
- Key and mouse events are only consumed if canvas is focused - NOTIFICATION_WM_MOUSE_ENTER, _MOUSE_EXIT, _FOCUS_IN and _FOCUS_OUT are emitted
2017-07-19-Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky
-Added system for feature overrides, it's pretty cool :)
2017-06-19Update HTML5 platform for new InputEventsL. Krause
2017-05-20Removal of InputEvent as built-in Variant type..Juan Linietsky
this might cause bugs I haven't found yet..
2017-05-05Merge pull request #8625 from eska014/html5-cursorshapeRémi Verschelde
HTML5: Cursor style control