Hajime Hoshi
1679555bbb
internal/ui: fix a wrong comment
2024-07-07 01:05:40 +09:00
Hajime Hoshi
ed73f028c7
internal/ui: refactoring
2024-07-04 16:58:45 +09:00
Hajime Hoshi
3a18b32cbd
internal/ui: bug fix: the screen size must be initialized first even when the canvas is unfocused
...
Closes #3034
2024-07-04 16:17:19 +09:00
Hajime Hoshi
d04d6271d0
internal/ui: bug fix: reset some input states on blur events on browsers
...
Closes #2874
2024-03-24 16:03:17 +09:00
Hajime Hoshi
f4029aaa77
ebiten: add (*Monitor).Size() to replace ScreenSizeInFullscreen()
...
Also, this change fixes redundant checks the case when a monitor
does not exist. Now Ebitengine checks a monitor existence at the
initialization.
Closes #2145
Closes #2795
2024-03-23 23:32:43 +09:00
Hajime Hoshi
c0d9954b3e
exp/textinput: use native pixels for a candidate window position
2024-03-03 23:35:34 +09:00
Hajime Hoshi
6d898d752e
ebiten: add (*Monitor).DeviceScaleFactor()
...
This replaces ebiten.DeviceScaleFactor().
Updates #2795
2024-02-12 17:09:03 +09:00
Hajime Hoshi
67d947d37a
internal/ui: remove Bounds
2024-02-12 15:24:00 +09:00
Hajime Hoshi
0adc1ad681
internal/ui: make virtual keyboard keys work at least on Android
...
Updates #2898
2024-02-03 21:11:54 +09:00
Hajime Hoshi
4895ae7f93
internal/graphicsdriver/opengl: refactoring: move some functions from internal/ui
...
Updates #2714
2023-12-23 22:30:13 +09:00
bsski
b8df1217c3
all: fix typos ( #2864 )
2023-12-17 22:42:34 +09:00
Hajime Hoshi
3df2ffebd1
internal/ui: refactoring: integrate Run except for mobiles
2023-11-05 00:49:53 +09:00
Hajime Hoshi
2db10b1e9c
ebiten: add RunGameOptions.SingleThread and deprecate ebitenginesinglethread
build tag
...
Closes #2830
2023-11-05 00:01:44 +09:00
Hajime Hoshi
accb777f51
internal/ui: refactoring: remove unused functions
2023-10-29 19:16:11 +09:00
Hajime Hoshi
5fe8c29b4c
internal/ui: refactoring: integrate (*UserInterface).run
2023-10-29 18:57:10 +09:00
Hajime Hoshi
ea842495cf
internal/ui: refactoring
2023-10-29 18:29:41 +09:00
Hajime Hoshi
457f6bb964
Revert "internal/ui: bug fix: panic at ReadPixels before running"
...
This reverts commit 2f6df3d4d6
.
Reason: regression by calling (*ebiten.Image).At from a different goroutine
Updates #2820
2023-10-27 14:29:41 +09:00
Hajime Hoshi
2f6df3d4d6
internal/ui: bug fix: panic at ReadPixels before running
...
Closes #2820
2023-10-27 12:18:34 +09:00
Hajime Hoshi
630789757f
all: add files for PlayStation 5
...
The implementation is WIP.
Updates #2799
2023-10-16 00:54:08 +09:00
Hajime Hoshi
47e70f2544
internal/ui: use errors.New instead of fmt.Errorf
2023-10-15 23:27:04 +09:00
Hajime Hoshi
18714e22a1
internal/ui: reland: return errors when getting a graphics driver fails
2023-10-15 18:34:08 +09:00
Hajime Hoshi
83a4133577
internal/ui: refactoring: remove globalState
2023-10-15 16:51:16 +09:00
Hajime Hoshi
a16a03c9db
internal/ui: refactoring
2023-10-15 16:38:05 +09:00
Hajime Hoshi
a89aaa0756
internal/ui: refactoring: remove fpsMode from globalState
2023-10-15 16:19:41 +09:00
Hajime Hoshi
27fd10595b
internal/ui: refactoring: reduce global functions and prefer Get()
2023-10-15 03:40:48 +09:00
Hajime Hoshi
69f1fa5f29
internal/ui: unify the receivers for UI
2023-10-15 02:51:23 +09:00
Hajime Hoshi
2a8d8d71fc
internal/ui: merge init functions
...
The Go specification doesn't determine the order of init functions.
In order to reduce unexpected behavior, merge some init functions.
2023-10-15 00:17:09 +09:00
Hajime Hoshi
82f2319020
internal/hook: rename hooks -> hook
2023-10-06 13:58:00 +09:00
Hajime Hoshi
aa55953c11
internal/ui: replace (*userInterface).err with (*globalState).err
2023-10-05 00:45:04 +09:00
Hajime Hoshi
506a1de259
internal/ui: refactoring: move device-scale implementation to internal/ui for browsers
...
The returned value from internal/devicescale.At never changes for
browsers, so the detection of devicePixelRatio updates didn't work
in the first place. Also, there is not a good way to detect the
change [1].
This change moves the logic from internal/devicescale to internal/ui.
We aim to merge these packages as a device scale factor belongs to
a monitor and internal/ui manages monitors.
[1] https://crbug.com/123694
2023-09-24 03:19:31 +09:00
Hajime Hoshi
02fd8cfb07
internal/ui: bug fix: preserve a captured cursor positions for toggling fullscreening for browsers
...
Closes #2475
2023-09-17 18:38:00 +09:00
Hajime Hoshi
a5aa721bda
internal/ui: update mouse and touch cursors after the layout is determined on browsers
...
Updates #2763
2023-09-17 16:30:47 +09:00
Hajime Hoshi
a62b8a00e7
internal/ui: use float64 for cursor positions internally
2023-09-17 03:43:18 +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
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
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
b40c5b1e99
internal/ui: catch an error at At at updateIconIfNeeded
...
Closes #2647
2023-04-20 00:59:14 +09:00
Hajime Hoshi
f009dd8dd2
ebiten: implement DroppedFiles to replace AppendDroppedFiles
...
Closes #2552
2023-01-25 14:27:11 +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
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
41a68bf17b
internal/ui: remove unused functions
2022-12-26 22:43:20 +09:00
Hajime Hoshi
dd7e125d9c
ebiten: add KeyName for desktops and browsers
...
Updates #1904
2022-12-25 03:37:29 +09:00
Hajime Hoshi
a5b6f39ed7
internal/ui: bug fix: reset the input state immediately after reading
...
Before this change, the input state was reset at the end of a tick.
This means that wheel deltas or input chars in a tick might be reset
unexpectedly.
This change fixes the issue by reseting the input state immediately
when reading, so that wheel events and input-char events are preserved.
Updates #2496
Updates #2501
2022-12-21 00:27:28 +09:00
Hajime Hoshi
59295cc85f
internal/ui: bug fix: input state should be reset for each tick, not frame
...
Before this change, input states were reset for each frame. When FPS
is bigger than TPS, the input state was reset more often than expected
and then some inputs were missing.
This change fixes the issue by resetting input states not for each frame
but for each tick.
This change also updates some comments of the input API.
Updates #2496
Closes #2501
2022-12-20 10:07:19 +09:00
Hajime Hoshi
d1b9a0a9a1
internal/ui: freeze the input state for each frame
...
After this change, the input APIs will return more consistent results
for one frame.
Closes #2496
2022-12-18 23:54:43 +09:00
Hajime Hoshi
3024e07ecc
ebiten: add RunGameOptions.ScreenTransparent
...
Closes #2378
2022-12-09 22:50:57 +09:00