hyvanmielenpelit / GnollHack

Rogue-like game based on NetHack
Other
58 stars 7 forks source link

UI scaling issues in iPadOS when system Display Zoom setting is non-default #2089

Open FarawayMagnet opened 3 months ago

FarawayMagnet commented 3 months ago

certain UI elements do not seem to scale properly on an ipad's screen. this is immediately visible in a brand-new game, during the introductory "Let's review the user interface" walkthrough. the red circles meant to call out various UI elements (buttons and such) do not align with the buttons they're meant to describe. see these screenshots for examples:

IMG_0575 IMG_0576

device info:

iPad Air 11-inch (M2)

app info:

GnollHack Version:4.2.0 (Build 15) Configuration:Release 10S Port Version:1.82 iOS Port Build:138

janne-hmp commented 3 months ago

On most devices, including newest iPad Airs, the screen scaling for tips works normally ok, but we have observed that with some devices sometimes the scaling is not correct. Do you have any particular screen scaling settings? Also, does the incorrect scaling happen consistently every time if you launch the UI tips during the game from Game Menu > User Interface Guide?

janne-hmp commented 2 months ago

Has the newest version (1.85) still the same problem?

janne-hmp commented 2 months ago

Closed with no answer.

FarawayMagnet commented 2 months ago

@janne-hmp apologies, apparently my github email notifications had become disabled.

i just reinstalled the latest version, which appears to be 1.86, and the issue persists.

IMG_0580

on my ipad, i have the "text size" setting (Settings app > Display & Brightness > Text Size) set to the furthest-left (smallest) option on the slider, but i have changed no other settings.

yes, this is consistently reproducible.

also, i've noticed another apparent scaling issue... there is some overlap between screen elements. see the inventory button indicated by my green arrow, top-right.

TommiGustafsson-HMP commented 2 months ago

Can you please post your iPad model and specs?

janne-hmp commented 2 months ago

Thanks, that should help us work on the issue.

FarawayMagnet commented 2 months ago

iPadOS Version 18.0 Model Name iPad Air 11-inch (M2) Model Number MUWC3LL/A

TommiGustafsson-HMP commented 2 months ago

I tested on that iPad on the Browserstack App Live test cloud and it worked ok. It must be some setting on your part that's causing the problem.

FarawayMagnet commented 2 months ago

i pointed you to the wrong setting in an earlier comment. i don't think the "Text Size" setting is actually relevant, it's more likely to be the "Display Zoom" setting (Settings app > Display & Brightness > Display Zoom). this setting is set to "More Space".

janne-hmp commented 2 months ago

That's right, it is the Display Zoom - More Space, which causes things to be pointed at the wrong place. We'll have to check how to determine that it is on, and what scaling number it in fact changes. Currently, the game assumes that the logical pixels are scaled by DisplayDensity only, but this does not seem to be the case when Display Zoom is on (there will be an extra scaling factor).