Hajime Hoshi
8b4c744ca8
internal/ui: rename a file
...
Use `_linbsd.go` suffix for Linux and BSDs.
2023-07-23 02:29:57 +09:00
Hajime Hoshi
91e1c0ea29
ebiten: add more cursor shapes
...
This change adds these new cursor shapes:
* CursorShapeNESWResize
* CursorShapeNWSEResize
* CursorShapeMove
* CursorShapeNotAllowed
Closes #2476
2023-07-23 00:49:45 +09:00
Hajime Hoshi
7a7d4fd91f
internal/ui: bug fix: need to delay to capture a cursor
...
From the spec https://w3c.github.io/pointerlock/#extensions-to-the-element-interface ,
capturing a cursor might require a cooltime. This change adds a delay
to capture a cursor just after escaping from a capture.
Closes #2693
2023-07-07 01:24:02 +09:00
Hajime Hoshi
eb5c1ee818
internal/ui: bug fix: the original cursor position was not scaled correctly
...
Updates #2690
2023-07-05 09:24:29 +09:00
Hajime Hoshi
929539b66e
add exp/textinput package
...
This works only for macOS and browsers so far.
Updates #1029
2023-07-05 02:09:04 +09:00
Hajime Hoshi
1d02d20879
internal/ui: fix comments
2023-07-04 23:34:00 +09:00
divVerent
b96aea70f1
internal/ui: compute antialias region size correctly. ( #2681 )
...
Closes #2679
2023-06-24 02:25:19 +09:00
Hajime Hoshi
0785502be3
internal/ui: refactoring
2023-05-09 00:35:54 +09:00
Hajime Hoshi
d2c991b774
all: refactoring: use image.Rectangle
2023-04-28 01:03:38 +09:00
Hajime Hoshi
00e45affe9
all: update OpenGL version from 2.1 to 3.2
...
'texelFetch' requires OpenGLSL 1.30, which requires OpenGL 3.0+.
macOS might not support OpenGL 3.0 and 3.1, so adopt 3.2.
Updates #1431
2023-04-23 14:25:36 +09:00
Hajime Hoshi
b40c5b1e99
internal/ui: catch an error at At at updateIconIfNeeded
...
Closes #2647
2023-04-20 00:59:14 +09:00
Hajime Hoshi
c00579509a
internal/ui: bug fix: wrong mouse cursor movement calculation
...
Closes #2634
2023-04-10 15:25:04 +09:00
Hajime Hoshi
09d2459f1c
internal/ui: a more robust fix for the unfocused-window loop
...
Depending on the member variable bufferOnceSwapped is a little fragile.
Detect whether the window is shown or not instead.
Updates #2620
2023-04-01 03:36:51 +09:00
Hajime Hoshi
db7c99fde8
internal/ui: bug fix: an unfocused window should not wait until buffers are swapped once
...
On macOS, a window is hidden until buffers are swapped once. If a game is
not runnable on unfocused, as the window is hidden and unfocused, the
waiting loop for a window never ends.
This change fixes the issue by changing the loop condition.
Closes #2620
2023-04-01 03:01:59 +09:00
Hajime Hoshi
14b34a7b0a
internal/ui: typo
2023-03-31 03:21:48 +09:00
Hajime Hoshi
1999f8a024
internal/ui: use DirectX as a fallback for old Windows
...
Initializing OpenGL can fail [1], though this is pretty rare. For such
this case, try DirectX as a fallback.
[1] https://answers.microsoft.com/en-us/windows/forum/all/my-drivers-dont-support-opengl/a1ee0267-4dc8-4385-a185-6ed322d78329
Updates #2613
2023-03-31 03:15:52 +09:00
Hajime Hoshi
370b7599bc
internal/graphicsdriver/directx: use OpenGL as the default on old Windows
...
On old machines, CreateSwapChain might fail without a specific reasons.
Probably this is due to an issue in drivers, and if so, there is nothing
we can do. When choosing a graphics library, prefer OpenGL on such old
machines.
Updates #2613
2023-03-31 02:21:11 +09:00
Hajime Hoshi
31273c875f
internal/graphics: rename constants
2023-03-23 20:48:39 +09:00
Hajime Hoshi
c7214ef6fb
internal/ui: use MaxVertexCount instead of IndicesCount
...
Updates #2460
2023-03-23 19:44:00 +09:00
Hajime Hoshi
1656c47abf
internal/ui: bug fix: hiding a window decoration at initialization doesn't work on macOS
...
Closes #2600
2023-03-14 00:27:57 +09:00
Hajime Hoshi
e93bcd9e55
internal/ui: bug fix: needed to wait for swapping buffers before entering fullscreen
...
Closes #2599
2023-03-13 21:40:40 +09:00
Hajime Hoshi
051b0c7238
internal/ui: bug fix: a big-offscreen size could be 0
...
Closes #2589
2023-03-03 22:34:43 +09:00
Hajime Hoshi
ea7d007df9
internal/ui: bug fix: dstRegion should not exceed the image region
...
Closes #2577
2023-02-21 14:15:39 +09:00
Hajime Hoshi
d91b8cae88
internal/ui: reland: refactoring: improve anti-alias logic
...
* Remove the image extension. The image is always flushed when necessary.
* Use a small offscreen image whichever the blend is.
Updates #2399
2023-02-19 23:49:32 +09:00
Hajime Hoshi
3aa8448511
Revert "internal/ui: refactoring: improve anti-alias logic"
...
This reverts commit 41f8295611
.
Reason: test failures: https://github.com/hajimehoshi/ebiten/actions/runs/4216421788/jobs/7318236488
2023-02-19 22:46:37 +09:00
Hajime Hoshi
41f8295611
internal/ui: refactoring: improve anti-alias logic
...
* Remove the image extension. The image is always flushed when necessary.
* Use a small offscreen image whichever the blend is.
Closes #2399
2023-02-19 22:14:23 +09:00
Hajime Hoshi
961c34efb5
internal/ui: use a small buffer image for anti-alias
...
Closes #2399
2023-02-19 17:35:43 +09:00
Hajime Hoshi
8479fee606
internal/ui: refactoring
2023-02-18 18:23:57 +09:00
Hajime Hoshi
56597800dd
internal/ui: refactoring: add bigOffscreenImage
...
Updates #2399
2023-02-18 02:32:41 +09:00
Hajime Hoshi
7315044dcf
internal/ui: remove a redundant call to close a window
...
glfw.Terminate should close the window too. This might fix the issue
so let's wait and see.
Updates #2551
2023-02-15 14:36:28 +09:00
Hajime Hoshi
8864ce1291
all: update comments
2023-02-07 12:05:43 +09:00
Pierre Curto
4de807cc44
all: fix typos ( #2558 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
f009dd8dd2
ebiten: implement DroppedFiles to replace AppendDroppedFiles
...
Closes #2552
2023-01-25 14:27:11 +09:00
Hajime Hoshi
16e49e0499
internal/ui: fix a potential out-of-range error
2023-01-24 00:32:08 +09:00
Hajime Hoshi
84e32c2e4e
internal/ui: more precise detection of directory on browsers
...
Updates #1868
2023-01-22 18:28:34 +09:00
Hajime Hoshi
8c25fac860
ebiten: add AppendDroppedFiles
...
Closes #1868
2023-01-22 17:22:25 +09:00
Hajime Hoshi
b79f0394cc
internal/ui: refactoring: allow slices in InputState
2023-01-22 01:28:57 +09:00
Hajime Hoshi
d53803615a
internal/ui: merge a window-closing state into an input state
2023-01-21 23:42:48 +09:00
Hajime Hoshi
08fba564f8
internal/ui: refactoring: define global sel_ objects
2023-01-09 01:41:13 +09:00
Hajime Hoshi
95f1ef0fb9
internal/ui: bug fix: recover the cursor shape when the cursor is visible
...
Closes #2527
2023-01-07 20:03:21 +09:00
Hajime Hoshi
86fa9366f7
internal/ui: use 'set' instead of 'push' for cursors
...
We don't need to use a cursor stack.
2023-01-07 19:16:41 +09:00
Hajime Hoshi
7418576c16
internal/ui: re-enable skipping to render the final screen when possible
...
With Metal, nextDrawable could return immediately when a command buffer
is empty. To avoid high CPU usage, this change adds a slight sleep in
this case.
With DirectX, Present waits for a while even though nothing is updated,
then that's fine.
Updates #2341
Updates #2342
Updates #2520
2023-01-03 23:09:28 +09:00
Hajime Hoshi
365740aca9
internal/ui: update comments
...
Updates #2521
2023-01-03 21:39:34 +09:00
Hajime Hoshi
67c9d65d82
internal/ui: refactoring
2023-01-03 21:17:47 +09:00
Hajime Hoshi
0bdfeec610
internal/ui: use a separate render thread for Nintendo Switch
...
Updates #2512
2023-01-03 21:12:18 +09:00
Hajime Hoshi
312dce950c
internal/ui: bug fix: compile failures with -tags=nintendosdk
...
Needed to use NativeDisplayType for eglGetDisplay.
2023-01-03 20:38:45 +09:00
Hajime Hoshi
6344273b7c
internal/ui: bug fix: compile failures with -tags=nintendosdk
2023-01-03 20:29:05 +09:00
Hajime Hoshi
73985c6c96
internal/ui: bug fix: compile failures with -tags=nintendosdk
2023-01-03 20:12:36 +09:00
Hajime Hoshi
723a44a822
internal/ui: rename ebitengine_Init -> ebitengine_Initialize
2023-01-03 19:23:38 +09:00
Hajime Hoshi
0e0205b2d0
internal/ui: use -overlay to provide the implementation for Nintendo Switch
...
Closes #2372
2023-01-03 19:10:15 +09:00