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
Hajime Hoshi
ededc5874b
ui: Bug fix: Scale was wrong when magnifier is enabled
...
Fixes #244
2017-11-09 02:06:35 +09:00
Hajime Hoshi
7bcc9ee79f
ui: Add GamepadIDs and remove IsGamepadPresent ( #447 )
2017-10-26 23:59:09 +09:00
Hajime Hoshi
600baf2cc7
ui: Add IsGamepadPresent
...
Fixes #447
2017-10-26 02:59:33 +09:00
Hajime Hoshi
05e220e105
ui: Allow smaller window width ( #444 )
2017-10-20 03:25:21 +09:00
Hajime Hoshi
414170b138
ui: Refactoring
2017-10-20 02:50:39 +09:00
Hajime Hoshi
b590005c7a
opengl: BindFramebuffer no longer returns error
2017-09-25 00:14:25 +09:00
Hajime Hoshi
835d199f02
ui: Rename SetIcon to SetWindowIcon ( #386 )
2017-09-23 17:40:09 +09:00
Hajime Hoshi
dacda0d176
ui: Add SetIcon ( #386 )
2017-09-23 04:28:57 +09:00
Hajime Hoshi
0dcba7844b
ui: Bug fix: SetScreenSize didn't work on browsers
...
This fixes #427
2017-09-07 11:58:04 +09:00
1l0
5d2393c3c1
glfw: Add StickyModes to window.InputMode ( resolve #314 #399 ) ( #423 )
2017-08-28 23:29:19 +09:00
Hajime Hoshi
99d170b454
ui: Remove isSafari that is not used anywhere
2017-08-27 02:14:23 +09:00
Hajime Hoshi
bb6dfeefd4
ui: Add comments on Touches
2017-08-22 00:58:38 +09:00
Jake
0d703ca3d4
InputChars ( #403 )
...
This implements #400
2017-08-15 04:11:51 +09:00
Hajime Hoshi
5f538bff82
ui: Bug fix: initCursorVisible must be true by default
2017-08-12 18:32:51 +09:00
Hajime Hoshi
783e57d3f2
ui: Remove 'fullscreen' member variable
2017-08-12 18:31:16 +09:00
Hajime Hoshi
b186bc1e94
ui: Add IsCursorVisible ( #377 )
2017-08-12 15:45:16 +09:00
Hajime Hoshi
f0d47312c4
ui: Add IsRunnableInBackground / SetRunnableInBackground ( #272 )
2017-08-03 03:21:51 +09:00
Hajime Hoshi
bb5036b3e1
ui: Refactoring
2017-08-03 01:07:04 +09:00
Hajime Hoshi
1021521591
ui: initFullscreen should always be protected by lock
2017-08-03 00:19:04 +09:00
Hajime Hoshi
434d5bb00b
ui: Bug fix: SetFullscreen / IsFullscreen should be concurrent safe; IsFullscreen should return the correct value even before Run
2017-08-02 23:48:08 +09:00
Hajime Hoshi
807d03eb3b
ui: Delay initialize until Run ( #397 )
2017-07-30 20:26:40 +09:00
Hajime Hoshi
3bfb5054af
Fix misspelling
2017-07-23 22:50:18 +09:00
Hajime Hoshi
5ae03494f2
ui: Resize canvas size when the window is resized ( #387 )
2017-07-22 02:04:15 +09:00
Hajime Hoshi
63e3bc73d6
ui: Implement fullscreen for browsers ( #387 )
2017-07-22 01:52:08 +09:00
Hajime Hoshi
f591ca3d2b
ui: Bug fix: SetFullscreen didn't work without Run
2017-07-15 21:43:33 +09:00
Hajime Hoshi
c94c994bd1
ui: Allow SetFullscreen without Run
2017-07-15 20:29:13 +09:00
Hajime Hoshi
e582a661c9
ui: Bug fix: Should add <meta> to <head> instead of <body>
2017-07-02 04:18:43 +09:00
Hajime Hoshi
d6466fdcaf
ui: Bug fix: initial scale must be 1 for proper scaling
2017-07-02 04:08:25 +09:00
Hajime Hoshi
d7b7aac6e4
ui: Fix wrong comment
2017-07-01 13:03:27 +09:00
Hajime Hoshi
7d236950c2
ui: Bug fix: SwapInterval needs to be called after SetMonitor ( #357 )
2017-07-01 12:41:16 +09:00
Hajime Hoshi
ba204c6d3b
ui: Adjust cursor positoin on fullscreen mode ( #374 )
2017-07-01 04:27:38 +09:00
Hajime Hoshi
c694851765
ui: Center the screen on fullscreen mode ( #374 )
2017-07-01 04:12:09 +09:00
Hajime Hoshi
3168af1db4
ui: Refactoring: refresh rate is ignored when no monitor is specified at SetMonitor
2017-06-30 23:20:53 +09:00
Hajime Hoshi
68fbf59720
ui: Refactoring
2017-06-30 11:07:19 +09:00
Hajime Hoshi
cefa86ce13
ui: Fullscreen scale can be recalculated during fullscreen mode
2017-06-30 10:54:13 +09:00
Hajime Hoshi
6336b59493
ui: Bug fix: original positions must not be updated during fullscreen mode ( #376 )
2017-06-30 10:48:18 +09:00
Hajime Hoshi
af8b5d72c3
ui: Bug fix: Fullscreen scale must be recalculated
2017-06-30 10:22:30 +09:00
Hajime Hoshi
76da09f74c
ui: Bug fix: Window title might lost on macOS ( #267 )
2017-06-30 02:14:14 +09:00
Hajime Hoshi
64ed7b93f6
ui: Bug fix: better restoring position ( #267 )
2017-06-30 02:11:54 +09:00
Hajime Hoshi
1d60c009ed
ui: Bug fix: fullscreen scale calculation was wrong ( #267 )
2017-06-30 02:08:12 +09:00
Hajime Hoshi
2996f778b6
ui: Bug fix: position was wrong when changing window size
2017-06-30 01:53:14 +09:00
Hajime Hoshi
5b6fa2d384
ui: Adjust cursor position on fullscreen ( #267 )
2017-06-30 01:39:26 +09:00
Hajime Hoshi
e7370d8a54
ui: Adjust fullscreen scale ( #267 )
2017-06-30 01:28:35 +09:00
Hajime Hoshi
5dbfafb200
ui: Reserve window position before entering fullscreen-mode ( #267 )
2017-06-30 01:28:03 +09:00
Hajime Hoshi
b569eb9c5a
ui: Add SetFullscreen / IsFullscreen ( #267 )
2017-06-30 01:28:00 +09:00
Hajime Hoshi
d0f086323b
ui: Use returning values
2017-06-30 00:37:24 +09:00
Hajime Hoshi
f7a8c7efa6
ui: Avoid recalc the scale factor
2017-06-05 00:06:40 +09:00
Hajime Hoshi
1d59938295
ui: Refactoring: Remove unneeded error handlings
2017-05-31 10:47:52 +09:00
Hajime Hoshi
7d181e3182
opengl: Hide OpenGL context usages into internal/graphics package
2017-05-31 02:18:04 +09:00
Hajime Hoshi
93cdfe107e
ui: Keep the device scale to avoid re-calculation
2017-05-14 04:21:20 +09:00
Hajime Hoshi
d6219e38d8
ui: Rename files
2017-05-13 19:50:40 +09:00
Hajime Hoshi
b409631515
Add FreeBSD support ( #352 )
2017-05-11 19:09:13 +09:00
Hajime Hoshi
4e22bd770f
ui: Remove Input interface and remove locks on browsers to improve performance ( #346 )
2017-04-28 23:45:01 +09:00
Hajime Hoshi
0dafbfe99d
ui: Speed optimization for browser keyboard inputs
2017-04-27 11:40:32 +09:00
Hajime Hoshi
fb612a4b87
ui: Adjust window size in case when glfwGetVideoMode fails ( #328 )
2017-04-19 00:51:15 +09:00
Hajime Hoshi
95cb0133de
ui: Add keys ( #339 )
2017-04-14 03:09:00 +09:00
Hajime Hoshi
0cd692d26a
ui: Use code instead of keyCode on browsers but Safari
2017-04-14 03:02:38 +09:00
Hajime Hoshi
88cfdf8878
ui: Remove println
2017-04-11 12:00:40 +09:00
Hajime Hoshi
187a93d80a
ui: Bug fix: IsKeyPressed might return a wrong value when only one of Shift/Ctrl/Alt keys is pressed
2017-04-11 11:56:05 +09:00
Hajime Hoshi
aa1e7e9cd6
Revert "ui: Use code instead of keyCode on browsers ( #339 )"
...
This reverts commit d7ea02d8c1
.
2017-04-10 20:38:23 +09:00
Hajime Hoshi
d7ea02d8c1
ui: Use code instead of keyCode on browsers ( #339 )
2017-04-10 20:30:28 +09:00
Hajime Hoshi
33ff25cc40
gofmt -s -w
2017-03-04 00:00:04 +09:00
Hajime Hoshi
cad051437d
ui: Refactoring
2017-03-03 11:15:07 +09:00
Hajime Hoshi
e11bc62059
ui: SetScreenSize/Scale no longer returns error
2017-03-03 10:58:29 +09:00
Hajime Hoshi
b6b61fc003
ui: setScreenSize in ui_glfw.go no longer returns error
2017-03-03 10:50:47 +09:00
Hajime Hoshi
0ba28d1183
ui: Remove unused function
2017-03-03 02:27:39 +09:00
Hajime Hoshi
ae378dc7f5
input: Extend number of gamepad buttons from 16 to 32 (for PS4)
2017-02-25 22:49:17 +09:00
Hajime Hoshi
9634794e7e
ui: Use GetWindowThreadProcessId to check who created the console ( #304 , #318 )
2017-02-09 03:49:45 +09:00
Hajime Hoshi
bd1a486b3a
Bug fix: gopherjs build failed on Windows
2017-02-09 02:37:40 +09:00
Hajime Hoshi
93684d5df3
ui: Hide console window by checking the parent process ( #304 , #318 )
2017-02-09 02:01:03 +09:00
gonutz
112654995f
Hide console window on Windows ( #318 )
...
* Hide console only if double-clicking Windows exe
When building on Windows the console window is hidden on start-up if
double-clicking the executable but not if running the program from the
command line (as a developer).
See the code comments for an explanation of the used heuristic.
2017-02-07 20:44:10 +09:00
Hajime Hoshi
0ef1e61d55
mobile: Fix iOS tag usages ( #310 )
2017-01-26 01:32:33 +09:00
Hajime Hoshi
6e897d1479
graphcis: Bug fix: Can't dispose textures/framebuffers after the context is lost (fixing #305 )
2017-01-22 01:37:08 +09:00
Hajime Hoshi
d3e1f91511
graphis: Bug fix: blurred screen after restoring the context ( #306 )
2017-01-21 15:16:47 +09:00
Hajime Hoshi
bccf76867e
graphics: Try to restore the context on browsers (WIP)
2017-01-21 02:56:26 +09:00
Hajime Hoshi
b86f1771e4
ui: Add goroutine so that blocking is available everywhere
2016-11-29 01:40:06 +09:00
Hajime Hoshi
a1e868b822
ui: Don't use 'image-rendering' CSS on Safari ( #293 )
2016-11-26 23:45:06 +09:00
Hajime Hoshi
411721a4da
ui: Add TODO
2016-11-26 02:35:55 +09:00
Hajime Hoshi
07294a98b6
Move internal/graphics/opengl -> internal/opengl
2016-11-03 23:31:25 +09:00
Hajime Hoshi
dc0254db40
ui: Optimized scaling on browsers
2016-09-15 10:04:48 +09:00
Hajime Hoshi
1f8cd41326
windows: Add comments
2016-09-11 22:34:39 +09:00
Hajime Hoshi
071b65f173
loop: Remove IsRunning
2016-09-03 21:14:06 +09:00
Hajime Hoshi
cd885ce7c5
ui: Add SetCursorVisibility ( #258 )
2016-09-03 18:54:21 +09:00
Hajime Hoshi
87efaafcff
Update GLFW version 3.1 -> 3.2
2016-09-03 16:25:43 +09:00
Hajime Hoshi
84b512a3ac
ui: Bug fix: Remove unneeded argument
2016-09-03 02:12:11 +09:00
Hajime Hoshi
ec70ea3be5
ui: Refactoring
2016-09-03 01:06:16 +09:00
Hajime Hoshi
db782ff0d9
ui: Remove UserInterface interface
2016-09-03 00:20:05 +09:00
Hajime Hoshi
f204c14f90
ui: Rename Run -> RunMainThreadLoop
2016-09-03 00:00:44 +09:00
Hajime Hoshi
6164ecb9fc
ui: Reduce functions in UserInterface
2016-09-02 23:45:54 +09:00
Hajime Hoshi
128dcaa342
ui: Rename Main -> Run
2016-09-02 02:59:40 +09:00
Hajime Hoshi
571d67f967
ui: Reduce methods in UserInterface
2016-09-02 02:31:03 +09:00
Hajime Hoshi
93a994f1d6
ui: Refactoring on mobile
2016-09-02 01:34:51 +09:00
Hajime Hoshi
453c2c4589
ui: Remove Terminate
2016-09-02 01:07:41 +09:00
Hajime Hoshi
6da16aa1a0
ui: Refactoring: Remove events
2016-09-02 00:53:05 +09:00
Hajime Hoshi
1e0bdf844d
loop: Bug fix: vsync should not use channels on browsers ( #259 )
2016-09-01 10:36:00 +09:00
Hajime Hoshi
cddaae55dd
ui: Simplify vsync
2016-08-28 17:09:58 +09:00
Hajime Hoshi
de1bb1b392
go generate
2016-08-27 00:50:26 +09:00
Hajime Hoshi
612d3b07b0
ui: Bug fix: ui.funcs might be closed before sending a value
2016-08-17 01:57:20 +09:00
Hajime Hoshi
3619a796dc
ui: Check the return value of ReleaseDC()
2016-08-09 00:25:47 +09:00
Hajime Hoshi
96a43bcb4d
ui: Bug fix: must call ReleaseGC ( #251 )
2016-08-09 00:09:22 +09:00
Hajime Hoshi
f556b19f22
Add error checks
2016-08-03 23:44:54 +09:00
Hajime Hoshi
8e58f3ce0a
ui: Bug fix: closed channel never blocks
2016-08-03 01:07:46 +09:00
Hajime Hoshi
30b521f3b8
Add error checks
2016-08-03 01:02:05 +09:00
Hajime Hoshi
6968e898c3
Bug fix: ui.Main should be suspended when error occurs in the loop
2016-08-02 02:48:19 +09:00
Hajime Hoshi
e118a755f5
ui: Bug fix: Sizing also calls GLContext
2016-07-24 05:29:47 +09:00
Hajime Hoshi
efe64d56f4
ui: Bug fix: Avoid dead lock
2016-07-24 04:32:12 +09:00
Hajime Hoshi
c5e42c91be
ui: Add glcontext.go
2016-07-24 00:05:36 +09:00
Hajime Hoshi
121063ee2b
ui: Initialize GLContext at Start
2016-07-23 22:17:36 +09:00
Hajime Hoshi
5a3ea34cfc
ui: Delay initializing the context
2016-07-23 21:43:35 +09:00
Hajime Hoshi
3553fc55c3
ui: Unify the context thread and the UI thread
2016-07-23 21:22:59 +09:00
Hajime Hoshi
8371426888
ui: Refactoring
2016-07-23 21:01:30 +09:00
Hajime Hoshi
1953539e22
ui: Refactoring: Simplify initializing
2016-07-23 20:25:52 +09:00
Hajime Hoshi
193c03ea58
ui: Bug fix: Don't use integer scale (JavaScript)
2016-07-09 18:27:29 +09:00
Hajime Hoshi
910e1b760c
ui: Introduce glfwScale
2016-07-04 11:37:34 +09:00
Hajime Hoshi
55bfe19bf8
opengl: Add context.DoWork (mobile)
2016-07-04 01:25:35 +09:00
Hajime Hoshi
61ba8dad17
opegnl: Remove initialization (use Reset instead) (mobile)
2016-07-04 01:04:35 +09:00
Hajime Hoshi
0d91883fb9
opengl: Remove init (desktops)
2016-07-04 00:51:58 +09:00
Hajime Hoshi
0e2a1a1636
mobile: Change the unit from px to dp on Android ( #241 )
2016-07-03 05:37:56 +09:00
Hajime Hoshi
47a0b3ccfa
ui: Need LockOSThread for mobile
2016-07-01 00:44:15 +09:00
Hajime Hoshi
3ebc5cc15a
ui: Stop the game when the window is deactivated ( #230 )
2016-06-30 01:07:54 +09:00
Hajime Hoshi
328ef85606
opengl: Prepare Context Losing for JavaScript ( #217 )
2016-06-29 23:18:02 +09:00
Hajime Hoshi
bb511b2c13
ui: Scale is now float64 ( #236 )
2016-06-25 01:26:59 +09:00
Hajime Hoshi
989ae1ebc5
ui: Fix deviceScale for mobiles
2016-06-19 05:14:02 +09:00
Hajime Hoshi
b0a7e13502
ui: Remove ScreenSizeEvent.Scale
2016-06-19 05:10:27 +09:00
Hajime Hoshi
6f50ef3604
ui: Get correct device scale for iOS
2016-06-19 05:10:27 +09:00
Hajime Hoshi
858b391592
ui: Bug fix: unused variable
2016-06-19 05:05:56 +09:00
Hajime Hoshi
ea377b8e20
ui: More accurate device scale factor
2016-06-19 05:04:38 +09:00