CurryKitten / CurryKitten-Sim

FPV quad simulator
70 stars 7 forks source link

Fix text scaling issues on 21:9 aspect ratio #43

Closed Docteh closed 4 years ago

Docteh commented 4 years ago

Hi, I notice that the GUI doesn't scale all that well on my 21:9 monitor. Well, 2560x1080.

Radio/Joystick Setup image In this picture the sticks have been centered

Keys and Instructions image

CurryKitten commented 4 years ago

Well on the plus side, I can close off #16 where we seemed to be having initial problems actually getting a 21:9 aspect ratio...so silver linings and all that.

Can you tell me if it's all the UI screens that have an issue, or these two specifically? I initially had this problem going from 16:9 to 4:3 but was solved by "anchoring" coordinates to different corners of the screen... so something on the bottom right is given a position of x pixels along and y pixels up from the bottom, which tends to retain a common look to everything.

I'm wondering if Unity bases it's scaling of font size based on the horizontal resolution, and isn't expecting a long thin screen. I'll investigate.

Docteh commented 4 years ago

Everything else seems fine at the moment, maybe the stick overlay is bigger than intended? but that is nice. image

Flight assist doesn't have much more room for more things image

Same with the pause menu image

Whoops, I forgot to look at the "About this sim" page image

CurryKitten commented 4 years ago

I went back and found that the anchors used in the radio panel were in fact incorrect, which would allow the panel to wander around on certain aspect ratios. However, as the text and joysticks were children of this UI parent, I would have expected the bulk of the radio overlay to look ok. Perhaps the way Unity sizes things is based on 1 aspect of the resolution instead of both. Not sure I can fix that, but I did go and redo the anchor points to (hopefully) get something a bit better. My problem is that I am unable to test this on a 21:9 screen, nor can I make a VM pretend to be that sort of resolution, so I'm working a little bit blind.

@Docteh if you want to drop me a note at currykittensim@gmail.com then I can get you the changes to try (if you let me know what platform you are running on as well - I'm assuming Win64)

Docteh commented 4 years ago

Circles are in the right spot now image

RC Rate 1.00 RC Expo 0.00 Superrate: 1.00 Throttle M: 1.00

You might want to bump the RC Expo on a fresh install, Beginner is 0.4, Intermediate is 0.3, Expert is 0.2, and the default is 0.0, kind of like a super expert setting? ;)

image I just noticed that the seven and one look quite similar.

CurryKitten commented 4 years ago

Thanks for the update. It's definitely weird the way that Unity handles this different aspect ratio, but it's at least workable now.

On the rates front, last night I opened up #46 to fix just such an issue. Which won't just touch the RC Expo, but everything else as well to make things quite docile by default.

I am kind of married to that font now though

CurryKitten commented 4 years ago

Reopening this. I had another person mention the issue with a 21:9 screen, and found I could emulate this setting in my Unity editor and recreate it. From here, I found I could alter the font scaling based on width (it's default) or height, or infact a mix of both. What I intend to do (as the stuff on 16:9 and 4:3 looks fine) is see if I can dynamically change this value for a 21:9 display and so detect and correct when I need to

CurryKitten commented 4 years ago

That went quicker than expected, all done

Screenshot 2020-05-08 at 13 16 02

Screenshot 2020-05-08 at 13 16 15

The scenarios menu took a bit longer because as it turned out the anchor points for the graphics were all over the show. Fixed these so everything expands from the mid point. This will be included in 0.47b

fzilic commented 4 years ago

credits

I have found an issue on credits. And also, resolution change does not update scaling and possitions. Set a 16:9 resolution (2560x1440 in my case), restart sim. Switch to 21:9 resolution, and it does not update, i have taken just a couple of screenshots, my guess is that after resolution change this code is not updated.

after switching from 16-9 to 21-9 - about after switching from 16-9 to 21-9 - radio after switching from 16-9 to 21-9

CurryKitten commented 4 years ago

Fixed the credits page (and the online joining/room/lobby pages) you will have to restart the sim after you change to 21:9, but hopefully, this won't cause massive inconvenience to the users... as there aren't that many of them with 21:9 monitors