Commit Graph

326 Commits

Author SHA1 Message Date
Hajime Hoshi
311788dfe2 ui: Remove warnings of deadlock
Now gopherwasm fixed this problem by avoiding js.MakeFunc.

See also: 3fe87b73c0
2018-05-27 04:10:14 +09:00
Hajime Hoshi
8e9c3bd304 ui: Use gopherwasm 2018-05-27 02:35:17 +09:00
Hajime Hoshi
5976e4bbbc audio: More intellegent suspending/resuming (#617)
Before this change, the audio is suspended when the game stops for
1/12[s]. However, as game often stops for more than 1/12[s]
especially on mobiles, this implemntation caused some audio
glitches.

This change fixes this problem by re-implementing suspending/
resumeing audio by detecting the window is active/focused or not.
2018-05-26 23:31:04 +09:00
Hajime Hoshi
d88d1be4ad mobile: Refactoring 2018-05-26 22:51:30 +09:00
Hajime Hoshi
c2df8326fc ui: Refactoring: Use IsNodeJS 2018-05-16 22:02:33 +09:00
Hajime Hoshi
3ccfe087d9 Refactoring 2018-05-12 15:25:01 +09:00
Hajime Hoshi
453921f1d3 ui: Bug fix: sizeChange must be set after updateFullscreenScaleIfNeeded 2018-05-12 02:11:37 +09:00
Hajime Hoshi
d8dba69b47 ui: Add MonitorSize
Fixes #470
2018-05-05 02:42:45 +09:00
Hajime Hoshi
d41f959b96 ui: Initialize GLFW before Run 2018-05-04 23:55:23 +09:00
Hajime Hoshi
9efccea31c ui: Add SetWindowTitle
Fixes #595
2018-05-02 19:21:17 +09:00
Hajime Hoshi
899f007fd0 ui: Panic when error is found on mobile 2018-04-07 03:33:20 +09:00
Hajime Hoshi
2d3c6ab5b8 ui: Remove build tag 'gomobilebuild'
Fixes #573
2018-04-07 02:14:54 +09:00
Hajime Hoshi
fcf4657a70 ui: Adjust touch positions at ui package (mobile) 2018-04-03 01:50:07 +09:00
Hajime Hoshi
76cb43a7f8 input: Refactoring: Remove unused arguments 2018-04-03 01:21:52 +09:00
Hajime Hoshi
0f2beab260 ui: Adjust touch positions in ui package (js) 2018-04-03 00:53:09 +09:00
Hajime Hoshi
c540d0fc0d ui: Add AdjustedTouches for consistency 2018-04-02 01:54:44 +09:00
Hajime Hoshi
7d2fd9654a input: Adjust mouse cursor position in ui package 2018-04-01 23:53:26 +09:00
Hajime Hoshi
4de2dc0240 Add input package 2018-04-01 23:20:45 +09:00
Hajime Hoshi
2110191794 mobile: Accept gomobile build (#249) 2018-03-24 02:52:42 +09:00
Hajime Hoshi
5ec5cf2450 ui: Add comments 2018-03-17 18:34:20 +09:00
Hajime Hoshi
526fbd3619 ui: Implement SetWindowDecorated and IsWindowDecorated
Fixes #430.
2018-03-17 18:30:55 +09:00
Hajime Hoshi
ef5de62780 Follow the standard comment rule
See https://golang.org/s/generatedcode
2018-03-08 02:47:59 +09:00
Hajime Hoshi
4c1cc9e699 ui: Bug fix: exit update function once when the context is lost (#526) 2018-03-02 01:05:54 +09:00
Hajime Hoshi
0cc456b534 ui: Rename sizeChanged -> toChangeSize 2018-02-25 00:44:45 +09:00
Hajime Hoshi
04341a014c ui: Add comments 2018-02-25 00:44:41 +09:00
Hajime Hoshi
a644e92298 restorable: Better calculation to clear restorable.Image 2018-02-24 21:16:30 +09:00
Hajime Hoshi
692f36f664 graphics: Add comments 2018-02-24 20:40:26 +09:00
Hajime Hoshi
78a58fd1ae ui: Bug fix: userInterface.fullscreen() must be called from the main thread 2018-02-24 18:10:39 +09:00
Hajime Hoshi
a87f197c1b ui: Add TODO 2018-02-24 14:50:45 +09:00
Hajime Hoshi
d4b8b99784 ui: Bug fix: return is needed for Edge case
Fixes #507
2018-02-21 21:53:49 +09:00
Hajime Hoshi
cc423c276d ui: Avoid creating empty slice at Touches 2018-02-12 20:23:24 +09:00
Hajime Hoshi
7d9b901ab3 ui: Avoid creating empty slice at GamepadIDs 2018-02-12 20:20:39 +09:00
Hajime Hoshi
e3023889ac ui: Change RegularTermination to a value 2018-02-04 00:22:38 +09:00
Hajime Hoshi
8b2ed6cddd ui: Update GraphicsContext every frame (#490) 2018-02-02 02:08:03 +09:00
Hajime Hoshi
38c72faf95 ui: Deprecate SetCursorVisibility and add SetCursorVisible (#407) 2018-01-09 02:01:33 +09:00
Hajime Hoshi
0a911b28b2 ui: Remove unneeded variable deviceScale 2018-01-07 14:51:25 +09:00
Hajime Hoshi
34d2e9a3fb ui: Remove unused function 2018-01-07 05:25:29 +09:00
Hajime Hoshi
0469ef386b ui: Fix comment 2018-01-06 23:53:35 +09:00
Hajime Hoshi
9ec0785203 Rename files _xwindow.go to _unix.go 2018-01-03 23:38:47 +09:00
Hajime Hoshi
a64367f906 ui: Refactoring: remove an unneeded member 2018-01-03 17:35:34 +09:00
Hajime Hoshi
c82809867d Add internal/devicescale 2018-01-03 05:22:56 +09:00
Hajime Hoshi
9578307d7b ui: Organize members 2018-01-03 00:23:18 +09:00
Hajime Hoshi
9478801076 ui: Implement SetScreenSize/Scale for mobiles
Fixes #250
2017-12-31 21:01:48 +09:00
Hajime Hoshi
473aeaa8b1 ui: Remove unneeded early return 2017-12-31 18:37:04 +09:00
Hajime Hoshi
362f002d36 ui: Delete local variables asap on Android 2017-11-13 01:30:08 +09:00
Hajime Hoshi
cea9bd5a19 input: Bug fix: runeBuffer should be reset on each frame 2017-11-10 01:21:15 +09:00
Hajime Hoshi
4b83a060fe ui: Add more keys not for charCode 2017-11-10 00:46:37 +09:00
Hajime Hoshi
fb8bef99c3 ui: Bug fix: key event on Edge browser 2017-11-10 00:39:46 +09:00
Hajime Hoshi
37ca48dc38 ui: Rename functions from Safari to Edge 2017-11-10 00:35:46 +09:00
Hajime Hoshi
0c0cd7e9d6 ui: Bug fix: call preventDefault for arrow keys
Fixes #450
2017-11-10 00:32:47 +09:00