Commit Graph

6 Commits

Author SHA1 Message Date
Hajime Hoshi
9a8d6e7b41 internal/ui: implement (*Monitor).Size for mobiles
Closes #2935
2024-09-16 19:42:23 +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
6d898d752e ebiten: add (*Monitor).DeviceScaleFactor()
This replaces ebiten.DeviceScaleFactor().

Updates #2795
2024-02-12 17:09:03 +09:00
Hajime Hoshi
a269cf3785 ebiten: remove (*Monitor).Bounds()
Now the unit of Bounds is device-dependent pixels, and this is useless
and Ebitengine API always treat device-independent pixels. Rather,
this might confuse users.

Until we find a good solution, let's remove Bounds() for v2.6.
MonitorType itself is still useful to specify a monitor to show a
window.
2023-09-23 18:24:03 +09:00
Hajime Hoshi
b3058b68a0 ebiten: change the unit of (*Monitor).Bounds
Monitors can have different device scale factors, and in this case,
it doesn't make sense to use device-independent pixels as unit for
monitor positions and sizes.

Updates #2778
2023-09-23 17:58:23 +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