joshuaauerbachwatson / anyCards

Multi-person card game with no built-in rules
Apache License 2.0
0 stars 0 forks source link

[ client ] Make it look acceptable on a phone #17

Closed joshuaauerbachwatson closed 1 year ago

joshuaauerbachwatson commented 1 year ago

Because I had a paucity of devices to test on, I decided to enable the app for iPhones. It runs, but the buttons in portrait mode on my iPhone 7 are nearly square and occupy too much vertical space. It's worse on a simulated iPhone 14 (the height of the buttons greatly exceeds their width). I also need appropriately scaled icon for running on a phone. Currently, the icon for the game is blank.

joshuaauerbachwatson commented 1 year ago

The reason for the weird appearance is that the layout for the buttons and labels is done "subtractively." Since the aspect ratio of the playing area is fixed, I am putting it at the bottom and then dividing the remaining space into two rows, each of which is allowed to fit available room. Phones are taller and skinnier than iPads (and the most recent phones are even worse, I think).

If we want to retain the fixed aspect ratio idea (but noting in issue #9 we will allow a different aspect ratio for landscape), then we probably have to make phones "second class citizens" that will have an iPad-shaped area centered with wasted space on the long dimension.

joshuaauerbachwatson commented 1 year ago

The basic layout work implied by this issue is done but there is still a problem on phones concerning the pop-up dialogs (game configuration, group management, dealing). Tablets use the preferredSize for these dialogs when they fit. On phones it seems like they are always presented full-screen. The layout logic currently assumes that preferredSize has been honored, so the result on phones suffers from the "stretched button" problem. I recall solving this problem for RazorPuzzle so I will try to adopt the same solution here.

Also noting that I still need to generate appropriate icon sizes for phones.

joshuaauerbachwatson commented 1 year ago

The popup dialogs are now adjusted so that they look acceptable (I won't say beautiful) on phones.

I'll work on the icons next. Probably, I should create all the icon sizes I will need for an app store connect submission because I may be moving to TestFlight soon.

joshuaauerbachwatson commented 1 year ago

It seems that only one additional icon was required. I may indeed have this out on TestFlight shortly.