Commit Graph

14 Commits

Author SHA1 Message Date
Hajime Hoshi
e7611139c3 uidriver/js: Bug fix: Watch the state regularly instead of events
visibilitystate is sometimes not called and in this case the app
does not come back.

This fix creates another goroutine to watch the state, and remove
event handlers.

Fixes #961
2019-10-21 00:04:07 +09:00
Hajime Hoshi
43a8881ab8 uidriver/ui: Reduce calls of syscall/js 2019-10-16 02:56:58 +09:00
Hajime Hoshi
72248fa3ef ui: Bug fix: Focus canvas explicitly on input
Fixes #961
2019-10-15 23:57:16 +09:00
Hajime Hoshi
75721e6fc1 ui: Auto scaling on browsers
This change forces Ebiten apps on browsers 'fullscreen' mode.
After this change, 'scale' value is no longer used on browsers.

Note that this breaks backward compatibility, but as long as the
game works in an iframe, this should not be problematic.

Fixes #960
2019-10-15 00:02:02 +09:00
Hajime Hoshi
30c185f254 uidriver/js: Bug fix: context must not be accessed before loop 2019-10-14 02:41:04 +09:00
Hajime Hoshi
10fb5e33be Replace GopherWasm with syscall/js
Fixes #857
2019-05-01 17:28:00 +09:00
Hajime Hoshi
db689f4e50 driver: Remove UI.Loop and add UI.RunWithoutMainLoop 2019-04-09 21:55:59 -04:00
Hajime Hoshi
24fdcdd8e4 uidriver: Rename updateGraphics -> updateSize 2019-04-08 23:49:31 -04:00
Hajime Hoshi
f6367308fc driver: Rename GraphicsContext -> UIContext 2019-04-08 23:28:08 -04:00
Hajime Hoshi
aecfd6b13d uidriver: Remove dependency on hooks package 2019-04-08 23:13:44 -04:00
Hajime Hoshi
0aa3135082 driver: Remove UI.AdjustPosition 2019-04-07 19:31:49 +09:00
Hajime Hoshi
26c32d36b5 uidriver: Move input implementation to uidrivers 2019-04-07 19:16:00 +09:00
Hajime Hoshi
a1697feeb1 driver: Add UI.Input() 2019-04-07 18:37:54 +09:00
Hajime Hoshi
7e5085f15b Add uidriver package and move UI implementation to this packaage 2019-04-07 18:21:16 +09:00