Commit graph

318 commits

Author SHA1 Message Date
Fabio Alessandrelli
ce542bced1 Implement Clipboard API read when supported.
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.
2019-05-29 23:21:09 +02:00
Fabio Alessandrelli
2b436dd50e Kinda working HTML5 clipboard paste.
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
2019-05-29 23:21:09 +02:00
Fabio Alessandrelli
0f76df2397 Add OS clipboard set support to OS Javascript 2019-05-28 12:59:29 +02:00
Rémi Verschelde
c29ef774d8
Merge pull request #29032 from akien-mga/tools-exceptions-rtti
SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
2019-05-21 17:10:51 +02:00
hbina085
f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
Rémi Verschelde
4b20959d99 SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
Those were disable to keep size small, and on Android avoid the dependency on the STL,
but for tools build (editor) this is not really a concern.

Note: as of today it's not possible to build tools=yes for those platforms, but this
change is one of the necessary steps to enable it.

Fixes #25262.
2019-05-20 16:51:20 +02:00
Fabio Alessandrelli
6622091eaf Fix OS_Javascript execute method
Signature was changed in OS via:

cd4449e7ab
2019-05-15 19:24:20 +02:00
Rémi Verschelde
d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Fabio Alessandrelli
6a1bf006a3 Move IDHandler JS module to platform from Websock 2019-04-12 12:41:49 +02:00
Hendrikto
49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
Rémi Verschelde
f1b01c96b9 HTML5: Fix ETC export for GLES2 fallback on mobile 2019-03-11 16:49:33 +01:00
volzhs
8920bb8c1b Fix directory check when exporting project
Fix #26702
2019-03-06 21:20:18 +09:00
Rémi Verschelde
b4d5c1ab5b
Merge pull request #26633 from akien-mga/driver-fallback-etc
Disable driver fallback to GLES2 by default
2019-03-06 00:57:49 +01:00
Rémi Verschelde
2e79ec973f
Merge pull request #26626 from rluders/misleading-error-message-export
Fixing misleading error message when trying to export
2019-03-05 22:55:16 +01:00
Ricardo Lüders
3fdbdd8380 Fixes misleading error message when trying to export
This patch fixes the misleading error message when users
try to "export all" into an invalid destination path.

Closes #26539
2019-03-05 21:32:52 +01:00
Rémi Verschelde
b0f782a0e3 Disable driver fallback to GLES2 by default
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.
2019-03-05 16:36:46 +01:00
bruvzg
75d75c68c4
Fix HTML5 quick preview URL 2019-03-05 15:48:11 +02:00
Rémi Verschelde
9d002442b2 Improve VRAM texture compression checks for mobile/web
For HTML5, we need to support S3TC if running on desktop,
and ETC or ETC2 for mobile, so make this explicit.

Add logic to check for ETC2 support on GLES3,
and remove incorrect ETC feature for GLES3 on Android.

Fix ETC check invalidating templates on HTML5.
Fixes #26476.
2019-03-03 13:24:08 +01:00
Rémi Verschelde
1807e0f135 SCons: Move platform-specific Opus config to its module 2019-03-02 10:30:25 +01:00
Juan Linietsky
f669ebeeaf -Properly handle missing ETC support on export
-Added ability for resource importers to save metadata
-Added ability for resource importers to validate depending on project settings
2019-02-26 18:45:06 -03:00
Juan Linietsky
5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
Leon Krause
76522624cb Use stdout/-err for all messages in HTML5 platform 2019-02-24 04:56:34 +01:00
Leon Krause
81554dac61 Fix file preloading warning in HTML5 platform 2019-02-23 20:06:22 +01:00
Rémi Verschelde
5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Juan Linietsky
a089061120 Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378. 2019-01-27 13:41:47 -03:00
Leon Krause
6939a03255 Allow requesting full screen during start-up in HTML5 platform 2019-01-23 03:42:17 +01:00
Rémi Verschelde
2323464f5e ExportDialog: Make error messages translatable
Also fix missing newlines that caused #24202.
2019-01-21 18:34:53 +01:00
Leon Krause
8f1669e771 Deal with Google's HTML5 autoplay policy
Resume audio context after mouse, touch or key input.
2019-01-20 14:25:15 +01:00
Rémi Verschelde
f0035b7cc7
Merge pull request #25150 from eska014/html5-warning
Fix HTML5 build warning
2019-01-20 09:25:21 +01:00
Leon Krause
db6be7b59f Refactor OS_JavaScript header 2019-01-20 00:13:20 +01:00
Leon Krause
0d47dccda9 Fix HTML5 gamepad logic for Emscripten 1.38.22 compat breakage 2019-01-20 00:07:31 +01:00
Guilherme Felipe
86d626e9cb Implements OS_JavaScript::set_custom_mouse_cursor 2019-01-03 13:51:16 -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
5f32fc8208
Merge pull request #20385 from moiman100/unify-double-clicking
Added double clicking to all buttons on Linux and Javascript
2018-12-14 23:47:03 +01:00
Rémi Verschelde
57c3f6a94b
Merge pull request #20063 from moiman100/fix-button-mask
Unified button mask behavior across platforms
2018-12-14 23:31:52 +01:00
Marcelo Fernandez
3a702b3ed8 Implemented audio input support for JavaScript audio driver 2018-11-26 19:14:52 -03:00
Rémi Verschelde
5beaea9891
Merge pull request #23389 from marcelofg55/multiple_ext
Export for OS X on OS X now lets you select .dmg or .zip
2018-11-02 11:07:18 +01:00
Marcelo Fernandez
d51999f11d Export for OS X on OS X now lets you select .dmg or .zip 2018-11-01 10:08:26 -03:00
Rémi Verschelde
39a5678c38
Merge pull request #23387 from eska014/memgrowth-preload
Enable --no-heap-copy flag for HTML5 builds
2018-10-29 23:43:11 +01:00
Leon Krause
5c2c47a174 Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
Avoids linker warnings and errors about undefined references.
2018-10-29 21:41:59 +01:00
Leon Krause
44e5d446c4 Enable --no-heap-copy flag for HTML5 builds 2018-10-29 21:08:51 +01:00
Zaven Muradyan
61d5513525 Add comments to javascript wrapper parts.
The code in pre.js and engine.js is a bit confusing to see in isolation,
since the files aren't valid JS files by themselves. This just adds some
explanatory text to both files.

Fixes #22937.
2018-10-15 08:56:44 -07:00
Leon Krause
d93050d8a2 Fix compiler warnings in HTML5 platform 2018-10-02 02:49:32 +02:00
muiroc
d6711701f6 Fix build for Javascript platform 2018-10-01 21:46:37 +02:00
Leon Krause
42c6a67dca Implement OS::set_icon in HTML5 platform 2018-09-16 20:46:21 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04: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
Leon Krause
cd7c0f67b9 Fix HTML5 gamepad input 2018-08-30 03:42:02 +02:00
Rémi Verschelde
57ba7caa6d
Merge pull request #21511 from eska014/webm-nomt
Fix WebM and Theora video in HTML5 export
2018-08-28 07:56:52 +02:00