summaryrefslogtreecommitdiffstats
path: root/platform/javascript/os_javascript.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix pointer position in hidpi-corrected resolutions on webLeonardo Giovanni Scur2019-06-141-4/+18
|/
* Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-1/+1
| | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* Implement Clipboard API read when supported.Fabio Alessandrelli2019-05-291-0/+17
| | | | | | | Being async, the first time a value is pasted GUI elements will still return the previous one. This at least until 'clipboardchange' window event gets implemented by user agents.
* Kinda working HTML5 clipboard paste.Fabio Alessandrelli2019-05-291-0/+10
| | | | | | | | | | | | | | | | Listen to paste events to update local clipboard. CTRL+V still not working out of the box. To do that, We would need to change how we handle keypress, most likely making it worse and less safe. In the end, I'm not sure we can fix it properly for now. Maybe in the future, with the Clipboard API, support of which is still pretty limited on chrome, and only available to extensions in Firefox. For now, you can paste via: - Browser bar -> Edit -> Paste. - Middle mouse click (Linux only, copies secondary clipboard). And THEN press CTRL+V
* Add OS clipboard set support to OS JavascriptFabio Alessandrelli2019-05-281-0/+19
|
* added a const keyword for a methods that return constant literal...hbina0852019-05-211-1/+1
|
* Fix OS_Javascript execute methodFabio Alessandrelli2019-05-151-1/+1
| | | | | | Signature was changed in OS via: cd4449e7abe97b2bc883e2d182db2cc41eb35f8c
* Disable driver fallback to GLES2 by defaultRémi Verschelde2019-03-051-1/+1
| | | | | | | | | | | | | | | | | | | GLES2 is not designed to be a drop-in replacement for the GLES3 backend, so the fallback mode has to be used knowingly. It *can* make sense for simple projects which make sure to handle the differences between both rendering backends, but most users should stick to one supported backend. By making it opt-in, we can now use this parameter to define whether to export ETC textures to Android and iOS when using GLES3 + Fallback. When using GLES3 without Fallback on Android, set the proper min GLES version in the AndroidManifest. Also made the option boolean and renamed it for clarity and to avoid conflict with the previous String option (which would always evaluate as "true" otherwise). Fixes #26569.
* -Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky2019-02-261-10/+0
| | | | -Fixed a bug where etc textures were imported broken
* Use stdout/-err for all messages in HTML5 platformLeon Krause2019-02-241-2/+2
|
* Fix pixelized previews, but also instances of breaking ImageTexture cache. ↵Juan Linietsky2019-01-271-0/+5
| | | | Closes #25378.
* Allow requesting full screen during start-up in HTML5 platformLeon Krause2019-01-231-1/+14
|
* Deal with Google's HTML5 autoplay policyLeon Krause2019-01-201-0/+6
| | | | Resume audio context after mouse, touch or key input.
* Fix HTML5 gamepad logic for Emscripten 1.38.22 compat breakageLeon Krause2019-01-201-1/+2
|
* Implements OS_JavaScript::set_custom_mouse_cursorGuilherme Felipe2019-01-031-2/+123
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #20385 from moiman100/unify-double-clickingRémi Verschelde2018-12-141-0/+28
|\ | | | | Added double clicking to all buttons on Linux and Javascript
| * Added double clicking to all buttonsMikko Mustonen2018-08-121-0/+28
| |
* | Merge pull request #20063 from moiman100/fix-button-maskRémi Verschelde2018-12-141-1/+4
|\ \ | | | | | | Unified button mask behavior across platforms
| * | Fixed button mask behaviormm2018-07-111-1/+4
| | |
* | | Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()Leon Krause2018-10-291-0/+18
| | | | | | | | | | | | Avoids linker warnings and errors about undefined references.
* | | Fix compiler warnings in HTML5 platformLeon Krause2018-10-021-13/+11
| | |
* | | Fix build for Javascript platformmuiroc2018-10-011-4/+4
| | |
* | | Implement OS::set_icon in HTML5 platformLeon Krause2018-09-161-0/+52
| | |
* | | Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde2018-09-131-1/+1
|\ \ \ | | | | | | | | Misc. typos
| * | | Misc. typosluz.paz2018-09-121-1/+1
| | | | | | | | | | | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
* | | | Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
|/ / / | | | | | | | | | | | | | | | 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.
* | | Fix HTML5 gamepad inputLeon Krause2018-08-301-2/+5
| | |
* | | Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam2018-08-261-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a static is_viable() method to all rasterizers which has to be called before initializing the rasterizer. This allows us to check what rasterizer to use in OS::initialize together with the GL context initialization. This commit also adds a new project setting "rendering/quality/driver/driver_fallback" which allows the creator of a project to specify whether or not fallback to GLES2 is allowed. This setting is ignored for the editor so the editor will always open even if the project itself cannot run. This will hopefully reduce confusion for users downloading projects from the internet. We also no longer crash when GLES3 is not functioning on a platform. This fixes #15324
* | | Merge pull request #21330 from eska014/html5-canvas-resizeRémi Verschelde2018-08-231-55/+60
|\ \ \ | | | | | | | | Facilitate external modification of HTML5 canvas size
| * | | Facilitate external modification of HTML5 canvas sizeLeon Krause2018-08-231-55/+60
| |/ /
* | / use console.warn instead of Module.printErr: emscripten no longer exports ↵Alon Zakai (kripken)2018-08-111-1/+1
| |/ |/| | | | | printErr by default, and instead err() should be used in code seen by the optimizer; however, as Godot only runs on the Web (and not in node.js or elsewhere), using console.warn directly is good enough, and will work in all versions if emscripten
* | -Project/Editor settings now use new inspectorJuan Linietsky2018-07-191-0/+5
|/ | | | | | | -Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
* Refactor OS_JavaScriptLeon Krause2018-07-101-597/+560
|
* Added support for extra mouse buttons.unknown2018-07-091-1/+4
|
* Merge pull request #18753 from eska014/html5-iframefocusMax Hilbrunner2018-05-101-5/+5
|\ | | | | Fix keyboard focus lock-out with HTML5 canvas in iframe
| * Fix keyboard focus lock-out with HTML5 canvas in iframeLeon Krause2018-05-101-5/+5
| |
* | Fix relative mouse motion when captured in HTML5 platformLeon Krause2018-05-101-1/+1
|/
* 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.