Commit Graph

428 Commits

Author SHA1 Message Date
Hajime Hoshi
14f2ee198e ebiten: add SetWindowMousePassthrough and IsWindowMousePassthrough
Closes #2511
2023-09-18 18:31:22 +09:00
Hajime Hoshi
6ab509f221 internal/ui: reland: bug fix: preserve cursor positions for toggling fullscreening for desktops
Updates #2475
2023-09-17 15:54:39 +09:00
Hajime Hoshi
9d73e45677 Revert "internal/ui: bug fix: preserve cursor positions for toggling fullscreening for desktops"
This reverts commit 7ed4db90be.

Reason: compile error on Windows
2023-09-17 15:43:38 +09:00
Hajime Hoshi
7ed4db90be internal/ui: bug fix: preserve cursor positions for toggling fullscreening for desktops
Updates #2475
2023-09-17 15:26:08 +09:00
Hajime Hoshi
8c25b07336 internal/ui: call updateInputState after layoutGame
The cursor position is affected by the current layout. Then, input
states should be updated after layoutGame is called.

Updates #2763
2023-09-17 14:58:32 +09:00
Hajime Hoshi
45acc2c5d8 internal/ui: reland: bug fix: disable window size limitation on fullscreen
Closes #2260
2023-09-16 16:49:49 +09:00
Hajime Hoshi
40fc96d78c internal/ui: forbid a green button when a max window size limit is specified
Updates #2260
2023-09-16 16:40:03 +09:00
Hajime Hoshi
128215eedd Revert "internal/ui: bug fix: disable window size limitation on fullscreen"
This reverts commit 9a5ef1b553.

Reason: we should disable the green button instead

Updates #2260
2023-09-16 03:23:34 +09:00
Hajime Hoshi
657e4c2541 internal/ui: update a comment
Closes #2240
2023-09-16 03:12:37 +09:00
Hajime Hoshi
619436a47b internal/ui: refactoring: add monitor_glfw.go 2023-09-16 00:16:00 +09:00
Hajime Hoshi
dd2768d5f3 internal/ui: bug fix: introduce locks for monitors
Updates #1853
2023-09-15 03:59:13 +09:00
Hajime Hoshi
32bd565df9 internal/ui: bug fix: setWindowMonitor was processed even when the same monitor was specified
Updates #1835
2023-09-15 03:30:15 +09:00
Hajime Hoshi
b710ff17c8 internal/ui: bug fix: wait for a while after exiting fullscreen on macOS
Closes #2758
2023-09-15 03:19:37 +09:00
Hajime Hoshi
90accfba1e internal/ui: bug fix: do not call PollEvents on Windows and Linux
Updates #2296
2023-09-15 03:11:58 +09:00
Hajime Hoshi
568e98ef1c internal/ui: bug fix: call setOrigWindowPos on entering fullscreen
Closes #2757
2023-09-15 02:53:38 +09:00
Hajime Hoshi
f7a801d591 internal/ui: refactoring 2023-09-15 02:45:31 +09:00
Hajime Hoshi
9a5ef1b553 internal/ui: bug fix: disable window size limitation on fullscreen
Closes #2260
2023-09-15 02:19:20 +09:00
Hajime Hoshi
f30a58a393 internal/ui: bug fix: disable global functions after the game termination
Closes #2743
2023-09-02 15:38:41 +09:00
Ketchetwahmeegwun T. Southall
60b7de6a3c
ebiten: add APIs to treat monitors (#2597)
This change adds these APIs:

* `type MonitorType`
* `func (*MonitorType) Bounds() image.Rectangle`
* `func (*MonitorType) Name() string`
* `func Monitor() *MonitorType`
* `func SetMonitor(*MonitorType)`
* `func AppendMonitors([]*MonitorType) []*MonitorType`

Closes #1835
2023-08-30 21:02:04 +09:00
Hajime Hoshi
f81dbd9288 internal/graphicsdriver: flush commands asynchronously whenever possible
Closes #2664
2023-07-30 22:44:13 +09:00
Hajime Hoshi
5a64f8299e internal/thread: refactoring: add a common interface Thread 2023-07-30 22:42:24 +09:00
Hajime Hoshi
d13bea29dc internal/ui: refactoring 2023-07-30 03:52:54 +09:00
Hajime Hoshi
3869e2e4f6 internal/ui: refactoring: integrate the render thread usages into internal/graphicscommand
Updates #2664
2023-07-30 03:50:49 +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
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
0785502be3 internal/ui: refactoring 2023-05-09 00:35:54 +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
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
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
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
f009dd8dd2 ebiten: implement DroppedFiles to replace AppendDroppedFiles
Closes #2552
2023-01-25 14:27:11 +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
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
365740aca9 internal/ui: update comments
Updates #2521
2023-01-03 21:39:34 +09:00
Hajime Hoshi
da97657afb Revert "internal/ui: refactoring: remove unnecessary hack for unfocusing"
This reverts commit 3f753b7086.

Reason: this was actually necessary.

Updates #982
Updates #987
Closes #2521
2023-01-03 02:06:55 +09:00
Hajime Hoshi
471237b701 internal/ui: bug fix: ignore ERROR_BUSY when deleting a GL context
Closes #2518
2023-01-02 15:05:16 +09:00
Hajime Hoshi
34941ca083 all: separate the rendering thread from the main thread
Updates #1704
Closes #2512
2022-12-30 22:57:34 +09:00
Hajime Hoshi
0fc21470e2 internal/ui: move some context-dependent processes to updateFrameImpl
This is a preparation to introduce an independent thread for rendering.

Updates #2512
2022-12-30 22:06:36 +09:00
Hajime Hoshi
b9fb4e9f50 internal/ui: remove an unnecessary hack for macOS
Now macOS always uses the native fullscreen even for a transparent
window, we no longer need a hack to call SwapBuffers explicitly.

Updates #1004
2022-12-30 16:25:05 +09:00
Hajime Hoshi
0a03df297b internal/ui: make it explicit to call swapBuffers only w/ OpenGL 2022-12-30 15:44:01 +09:00
Hajime Hoshi
fa4916d063 internal/ui: refactoring 2022-12-30 13:28:00 +09:00
Hajime Hoshi
3f753b7086 internal/ui: refactoring: remove unnecessary hack for unfocusing
The sleeping for an unfocused state also happens in (*userInterfaceImpl).update().

Updates #982
Updates #987
2022-12-30 00:41:46 +09:00
Hajime Hoshi
7e7deeab22 internal/ui: bug fix: SetWindowIcon crashed in the single-thread mode
Updates #1468
Closes #2513
2022-12-30 00:01:11 +09:00
Hajime Hoshi
b597ed1e27 internal/ui: remove unnecessary swapBuffer call
This was introduced at 9e161864f6, the
background is now unclear. Things work even without this hack.

Updates #157
Updates #158
2022-12-29 21:48:37 +09:00
Hajime Hoshi
42c08698fb internal/ui: give up re-rendering on resizing the window
It seems difficult to implement this correctly as long as the rendering
thread is the same as the main thread.

Closes #2144
Updates #2512
2022-12-29 21:27:44 +09:00
Hajime Hoshi
dd853050e9 internal/ui: refactoring 2022-12-29 21:09:30 +09:00