Hajime Hoshi
3074dca670
internal/ui: add the EBITEN_GRAPHICS_LIBRARY environment variable
...
The `ebitengl` build tag is gone instead.
Closes #2007
2022-03-24 02:23:37 +09:00
Hajime Hoshi
15548b4c74
internal/ui: add userInterfaceImpl.graphicsDriver
2022-03-22 00:13:22 +09:00
Hajime Hoshi
be1836339b
internal/ui: define the common struct UserInterface for all the environments
...
The existing UserInterface structs became userInterfaceImpl structs.
2022-03-21 23:10:27 +09:00
Hajime Hoshi
12ce5ae83a
internal/ui: remove the call of graphicsDriver() from the context
2022-03-21 16:48:33 +09:00
Hajime Hoshi
4cbce71b2b
internal/graphicscommand: move the choice of graphics drivers to internal/ui
2022-03-20 02:51:31 +09:00
Hajime Hoshi
dd8900ea48
internal/graphicsdriver: refactoring: choose the graphics driver at this package
2022-02-27 23:51:19 +09:00
Hajime Hoshi
871121abe3
internal/ui: refactoring: remove (*contextImpl).layout
2022-02-14 02:59:02 +09:00
Hajime Hoshi
e09c1bf8f1
internal/ui: refactoring: remove an error value from runOnAnotherThreadFromMainThread
2022-02-14 00:55:58 +09:00
Hajime Hoshi
b695cb928a
internal/ui: remove RunWithoutMainLoop in non-mobile environments
2022-02-13 22:31:48 +09:00
Hajime Hoshi
0c1c40995c
internal/ui: rename types and members: uiContext -> gameForUI
2022-02-13 20:20:46 +09:00
Hajime Hoshi
08defeeded
internal/ui: move more logics to internal/ui
2022-02-13 20:02:49 +09:00
Hajime Hoshi
9b2f0b6c56
internal/ui: rename ResetForFrame -> ResetForTick
...
Resetting happens every tick, not every frame.
2022-02-13 19:54:40 +09:00
Hajime Hoshi
6a8e45e6c1
internal/ui: refactoring: simplify ResetForFrame
...
Updating the layout is already done every frame, so doing this in
ResetForFrame is not needed.
Updates #490
2022-02-13 19:31:35 +09:00
Hajime Hoshi
7b164882fc
internal/ui: refactoring: move AdjustPosition to the package internal/ui
2022-02-13 19:14:29 +09:00
Hajime Hoshi
2609d73a1a
internal/ui: refactoring: move some logics to internal/ui
2022-02-13 18:01:18 +09:00
Hajime Hoshi
b282b1805b
internal/ui: refactoring: add ui.SetError
...
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00
Hajime Hoshi
e9cfbc1630
internal/ui: refactoring: remove Graphics()
2022-02-13 04:17:39 +09:00
Hajime Hoshi
2c2c4bc428
ebiten: add WindowResizingModeType and its constants and functions
...
This allows a new state to disallow resizing the window but allow
making the window fullscreen on macOS by a user.
This change adds the new type WindowResizingModeType. There are
these constants of this type:
* WindowResizingModeDisabled
* WindowResizingModeOnlyFullscreenEnabled
* WindowResizingModeEnabled
Closes #1819
2022-02-11 04:59:04 +09:00
Hajime Hoshi
35b9dd0846
internal/ui: give up SetWindowAspectRatioFixed
...
Unfortunately, it is almost impossible to provide a consistent behavior
to keep the aspect ratio of the window on Windows. Instead of having an
incomplete API, let's remove this.
Closes #1988
2022-02-10 18:35:00 +09:00
Hajime Hoshi
0291986658
internal/ui: bug fix: make the window resizable after the window is created
...
Making the window resizable BEFORE the window is created doesn't
work correctly, especially when switching to enable resizing later.
Closes #1987
2022-02-10 00:53:22 +09:00
Hajime Hoshi
5899470511
internal/ui: enable vsync even when resizing the window
...
Now I couldn't see the issue. Probably the implementation of
internal/graphicsdriver/metal has changed since the last fix, but
I am not sure.
Updates #1740
Closes #1954
2022-02-09 23:59:38 +09:00
Hajime Hoshi
edca32e520
internal/ui: bug fix: do not set the minimum window width for macOS
...
Shrinking a window size by a cursor sometimes makes a smaller window
than 126px. To avoid such flaky behavior, do not set the limitation of
the minimum window width.
On Linux/UNIX, there should not be reasons to limit the window width.
Updates #165
2022-02-09 23:30:26 +09:00
Hajime Hoshi
ad675640b1
internal/ui: bug fix: the aspect ratio should update the window size limits
...
Updates #1804
2022-02-09 23:18:41 +09:00
Hajime Hoshi
f2da62a175
internal/ui: refactoring
2022-02-09 22:22:14 +09:00
Hajime Hoshi
57c123a412
internal/ui: add comments
...
Updates #1804
2022-02-09 22:16:31 +09:00
Hajime Hoshi
7482cae978
internal/ui: bug fix: the aspect ratio must be updated whenever the window size is forcibly updated
...
This also adds a new flag -aspectratiofixed to examples/windowsize
Updates #1804
2022-02-09 19:56:50 +09:00
Hajime Hoshi
740dfd5aed
internal/glfw: refactoring: keep the original API when possible
...
Updates #1804
2022-02-09 19:36:47 +09:00
Hajime Hoshi
623c050537
ebiten: rename SetKeepWindowAspectRatio -> SetWindowAspectRatioFixed
...
Updates #1804
2022-02-09 19:29:55 +09:00
Tom Lister
18659ef4ab
internal/ui: add SetWindowKeepAspectRatio ( #1985 )
...
Updates #1804
2022-02-09 19:11:25 +09:00
Hajime Hoshi
180eb483bb
internal/ui: make currentMonitor return initMonitor when the window is not initialized yet
2022-02-09 00:26:49 +09:00
Hajime Hoshi
b2872f216a
internal/ui: update comments
...
Updates #1575
2022-02-08 20:27:46 +09:00
Hajime Hoshi
cd2ef6771a
internal/ui: bug fix: a wrong monitor was used at setWindowPositionInDIP
2022-02-08 20:20:36 +09:00
Hajime Hoshi
9f581327fa
intetrnal/ui: remove recreating a window after the fullscreen mode
...
As macOS's fullscreen is a native fullscreen, this hack is no longer
needed.
Updates #1004
2022-02-08 19:41:09 +09:00
Hajime Hoshi
f8097eb45d
internal/ui: give an initial window size at createWindow
...
This enables to skip setWindowSizeInDIPImpl in most cases.
Updates #1651
Updates #1914
2022-02-08 19:36:30 +09:00
Hajime Hoshi
320e7037f6
internal/ui: update comments
2022-02-08 19:23:38 +09:00
Hajime Hoshi
6dbc5ba558
internal/ui: refactoring: call updateWindowSizeLimits in createWindow
2022-02-08 16:06:12 +09:00
Hajime Hoshi
4c6c31e384
all: reorder build tags in an alphabetical order
2022-02-08 15:49:15 +09:00
Hajime Hoshi
9c8b4db81f
internal/ui: separate 'vibrate' part to internal/vibrate
2022-02-08 14:48:55 +09:00
Hajime Hoshi
d2d3673bd2
internal/ui: remove a redundant call of SetTitle
2022-02-08 04:30:58 +09:00
Hajime Hoshi
2fc09c7fcb
internal/ui: use the cursor position to choose the initial monitor for Linux/UNIX
...
Updates #1918
Closes #1982
2022-02-08 03:20:45 +09:00
Hajime Hoshi
294ee43716
internal/ui: remove a special logic for UNIX
...
The issue #1118 can no longer be reproduced.
Updates #1118
Updates #1982
2022-02-08 01:29:22 +09:00
Hajime Hoshi
cb4085277b
internal/ui: bug fix: adjust the window position correctly
...
Updates #1982
2022-02-07 23:52:16 +09:00
Hajime Hoshi
ed04021151
internal/ui: use the cursor position to choose the initial monitor for Windows
...
Updates #1918
Updates #1982
2022-02-07 23:31:46 +09:00
Hajime Hoshi
cafb71719c
internal/ui: use the cursor position to choose the initial monitor
...
Updates #1982
2022-02-07 22:37:10 +09:00
Hajime Hoshi
126dc81a96
internal/ui: add a comment
2022-02-07 00:51:48 +09:00
Hajime Hoshi
52f4c409ac
internal/ui: refactoring: make Graphics a global function
2022-02-06 20:29:49 +09:00
Hajime Hoshi
0f09ddfbd2
internal/driver: remove Window
...
Closes #1983
2022-02-06 20:12:40 +09:00
Hajime Hoshi
2fbfa5444b
internal/driver: remove Input
2022-02-06 18:34:31 +09:00
Hajime Hoshi
6f72b15912
internal/driver: move some definitions to internal/ui
...
Updates #1983
2022-02-06 18:13:45 +09:00
Hajime Hoshi
149736c3cf
internal/uidriver/*: integrate the packages into internal/ui
...
Updates #1983
2022-02-06 17:23:04 +09:00