Commit graph

158 commits

Author SHA1 Message Date
Rémi Verschelde
3e681227ab Merge pull request #12010 from eska014/jseval
Improve JavaScript calls, allow passing byte arrays to GDScript
2017-10-11 22:36:52 +02:00
Leon Krause
5e06d3d814 Improve JavaScript calls
- Allow returning ArrayBuffer and views as PoolByteArray
 - Return real_t for integral numbers
 - Read all color channels as 0.0 - 1.0 floating point numbers
2017-10-11 01:14:07 +02:00
Hein-Pieter van Braam
2bece6bbd3 Merge pull request #11782 from eska014/persistent-userfs-test
Add OS::is_userfs_persistent, allow starting HTML5 platform in private mode
2017-10-03 12:24:11 +02:00
Andreas Haas
132ba0ed97 Merge pull request #11568 from endragor/loggers
Extract logging logic
2017-10-02 23:51:26 +02:00
Leon Krause
7b23665e72 Add OS::is_userfs_persistent to check user:// persistence
Allows starting HTML5 export when IndexedDB is not available.
2017-10-02 21:07:05 +02:00
Leon Krause
11ab7b6efc Use primary WebAssembly.instantiate overload
Previously WebAssembly.compile was used along with the secondary
WebAssembly.instantiate overload. Using only the primary overload is
recommended to get best performance.
2017-10-02 13:09:59 +02:00
Elliott Sales de Andrade
3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
5be675eb03 Use BoolVariable for module options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Ruslan Mustakov
1a2311e350 Extract logging logic
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-25 16:19:21 +07:00
Leon Krause
d1ecc25db4 Fix mouse button state in HTML5 platform
Regression from 844c5e12e6
2017-09-19 19:27:52 +02:00
Rémi Verschelde
53bbc046ee Merge pull request #11252 from marcelofg55/fix_noaudio_crash
Fix crash when no audio driver is available
2017-09-17 22:48:22 +02:00
Marcelo Fernandez
7a4c0ff35e Fix crash when no audio driver is available 2017-09-13 20:54:55 -03:00
Maxim Sheronov
0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Poommetee Ketson
8bf8cf1316 Merge pull request #11154 from eska014/html5-startup-revamp
HTML5 start-up overhaul with download progress display
2017-09-12 04:35:30 +07:00
Leon Krause
4db801aaea HTML5 start-up overhaul
- Implement promise-based JS interface for custom HTML page
   integration
 - Add download progress callback
 - Add progress bar and indeterminate spinner to default HTML page
 - Try downloading files multiple times when failing
 - Get rid of godotfs.js
 - Separate steps for engine initialization, game initialization and game
   start
 - Allow multiple games on one HTML page
 - Substitution placeholders only used in .html file
 - Placeholders renamed: $GODOT_BASE => $GODOT_BASENAME,
   $GODOT_TMEM -> $GODOT_TOTAL_MEMORY
 - Emscripten Module is now Engine.RuntimeEnvironment (no longer a global)
2017-09-11 20:56:29 +02:00
Rémi Verschelde
6a08f8288e Merge pull request #10914 from eska014/html5-main-notif
Prevent sending MainLoop notifications before initialized
2017-09-03 11:28:03 +02:00
Leon Krause
8c4fb4cec8 HTML5: Prevent sending MainLoop notifications before initialized 2017-09-03 04:13:24 +02:00
Matthias Hoelzl
b6e1e47e3a Make build scripts Python3 compatible
- The Windows, UWP, Android (on Windows) and Linux builds are
  tested with Scons 3.0 alpha using Python 3.
- OSX and iOS should hopefully work but are not tested since
  I don't have a Mac.
- Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-27 23:05:39 +02:00
Rémi Verschelde
7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Marcelo Fernandez
63f847b306 p_screen param from get_screen_* funcs now default to the current screen 2017-08-21 18:28:29 -03:00
toger5
2286037bc3 removed calls to cursor_set_visible on all platforms fixes #10167 2017-08-08 14:04:22 +02:00
Rémi Verschelde
6d213909cb Merge pull request #10105 from eska014/html5-touch-hint
Implement OS.has_touchscreen_ui_hint() in HTML5 platform
2017-08-07 14:49:33 +02:00
Rémi Verschelde
4775d07977 Merge pull request #10104 from eska014/canvas-mgmt
Improve HTML5 canvas management
2017-08-07 14:49:16 +02:00
Bojidar Marinov
7b7c7c8dc0
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
2017-08-06 16:26:07 +03:00
L. Krause
bd48f210a1 Improve HTML5 canvas management
- set_window_maximized hides page content
 - Fix sporadic full-screen render-size bug in Chromium
 - Smoother resizing for maximized canvas
2017-08-05 05:27:58 +02:00
L. Krause
0c693595d6 Implement touch-screen check in HTML5 platform 2017-07-28 05:39:25 +02:00
Rémi Verschelde
401f1098f6 Merge pull request #9770 from eska014/html5-focus
Implement input focus behavior in HTML5
2017-07-23 13:13:09 +02:00
L. Krause
ca28c068c0 Implement input focus behavior in HTML5
- 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-22 17:25:15 +02:00
Juan Linietsky
25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
L. Krause
69e0dee983 Fix zipping HTML5 templates when using implicit cache 2017-07-17 03:53:31 +02:00
Rémi Verschelde
e91a267a7c Buildsystem: Improve detect.py readability and fix issues
Tried to organize the configure(env) calls in sections, using the same order
for all platforms whenever possible.

Apart from cosmetic changes, the following issues were fixed:
- Android: cleanup linkage, remove GLESv1_CM and GLESv2
- iPhone: Remove obsolete "ios_gles22_override" option
- OSX:
  * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option
    (closes #9449)
  * Make "fat" bits argument explicit
- Server: sync with X11
- Windows: clean up old DirectX 9 stuff
- X11:
  * Do not require system OpenSSL for building (closes #9443)
  * Fix typo'ed use_leak_sanitizer option
  * Fix .llvm suffix overriding custom extra_suffix
2017-07-01 08:20:51 +02:00
L. Krause
a2fd89bbe2 Hide HTML5 native-run icon without runnable preset 2017-06-27 21:06:43 +02:00
L. Krause
92367968e7 Use custom native-run icons for Android and HTML5 2017-06-27 21:06:26 +02:00
Poommetee Ketson
e3998528e0 BuildSystem: generated files have .gen.extension 2017-06-25 07:55:01 +07:00
L. Krause
6f17d41bcf Update HTML5 platform for new InputEvents 2017-06-19 15:43:46 +02:00
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Juan Linietsky
98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Rémi Verschelde
120ce92e32 Merge pull request #8625 from eska014/html5-cursorshape
HTML5: Cursor style control
2017-05-05 22:52:48 +02:00
L. Krause
0811335fd5 Implement cursor style control in HTML5 platform 2017-05-02 13:31:27 +02:00
Rémi Verschelde
9bdc498f90 Merge pull request #8574 from eska014/html5-noglut
Remove GLUT usage in HTML5 platform
2017-05-02 11:30:01 +02:00
L. Krause
101c542b77 Implement mouse capture and hiding in HTML5 export
MOUSE_MODE_CONFINED cannot be implemented.
2017-05-02 04:01:34 +02:00
L. Krause
abe09919bf Fix HTML5 key events
Regression from 86f5ac3
2017-04-29 04:42:50 +02:00
L. Krause
847bd33fdf Remove GLUT usage in HTML5 platform 2017-04-28 21:54:44 +02:00
L. Krause
86f5ac3d74 Implement HTML5 touch events 2017-04-26 16:30:22 +02:00
L. Krause
a99b6b2063 Reimplement HTML5 mouse input without GLUT
Fixes inverted scrolling on Chromium
2017-04-25 14:48:46 +02:00
Sergey Pusnei
8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky
000e873008 Merge pull request #8191 from eska014/webgl2-export
WebGL 2 export per WebAssembly or asm.js
2017-03-29 15:21:52 +02:00