Yeah, that’s exactly what i complained about =)
First FixedSize is a wrong name then, more fitting would be something like scaledRelativeToScreenHeight or something like that. Cause its really not fixed size, its fixed relative size at best, not even that since only relative in one direction.
Second, besides the name, way more important: the functionality itself is bad.
Again, when you think about the usability, who wants his buttons to have different dimensions in portrait mode than in landscape mode on his smartphone/tablet?
For a good modern UI system there really should be a mode (which likely should even be the default setting), let’s say fixedPhysicalDimensions, which as i said would make the buttons always have the exact same physical dimensions no matter which screen width, height or dpi the app runs at.
So one can anchor things and make the available room for (scroll)panes etc change fitting to the screen dimensions, and any user interaction control parts like buttons have the same physical dimensions so they always look good and are well usable with touch and mouse.
I’d say this is actually one of the most essential features for doing multiplatform stuff with a UI system, especially but not only when doing stuff for touch screen devices which are used in both portrait and landscape orientation and where one has to ensure buttons used with touch always have the same physical dimensions in both portrait and landscape and also generally always have the same physical dimensions on any screen resolution and dpi so that they are actually well usable with touch with your fingers.
(This will also become very important on desktops and laptops very soon since more and more of them go higher dpi, weird special resolutions, get touch support and more and more of the better desktop screens allow rotating the screen so it can be used in portrait and landscape, too. So it is most essential for UI to be usable in fixed physical dimensions for user input controls independent of resolution, dpi and screen orientation)
A button which has right dimensions for being touched with your finger in portrait orientation but then gets scaled down in landscape orientation and hence looks bad and worse has too small touch are in landscape device orientation makes absolutely zero sense.
Besides lacking in usability, yeah, it also looks really bad to have bitmap stuff scaled smaller there just because the user looks at it in a landscape instead of portrait screen orientation.
Now ok, let's get constructive here =)
So far ngui does not have any such feature, so will you add it for an update?
I’d say (besides better looking fonts/text rendering and better working and more intuitive anchoring/relative panel sizing needed and vector graphics assets support) this is THE most important required functionality for a modern multiplatform UI system.
I’ll just brainstorm some on how a fixedPhysicalDimensions enforcer could maybe be done, anyone feel free to add to or improve on the thoughts =)
So maybe when choosing FixedPhysicalDimensions as new scaling style setting in the UIRoot, it could expose the property fields baseScreenWidth, baseScreenHeight, baseDPI.
So one would basically enter the values for the screen the UI is made in as base setting.
It could also set the current game view's settings as base values automatically at the start.
Ok, then based on that the script could whenever the screen width, screen height or dpi changes (happens when changing device orientation or user changes resolution setting) or generally is different than your base settings, it would calculate scale factor needed to scale things accordingly to lead to all having the same physical dimensions.
Do you think trying to implement the fixed physical dimensions feature this way could work?