Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: pretender on January 05, 2013, 06:15:55 AM
-
i have complaints from people using high resolution devices that the gui is cut off.
devices are new nexus 10 and new asus tablet both over 1920x1600.
the stuff on the right side is cutoff. it uses anchor right.
the stuff on the left is fine, it uses anchor top left.
it works very well on devices from 800,1000 and 1280 widths. how to adress this issue?
thank you very much!
-
If you anchored it via a right-aligned anchor, then it should be exactly the same as the left-aligned one. Automatic UIRoot or manual? If manual, what's the "min height" set to?
-
UIRoot is set to automatic.
The setup is such that it's anchored right, but since i use draggable panel i have a script that fixes clipping from top to bottom. i dont know if that is causing trouble (it is vertical draggable panel but gui is cut off horizontally)
It's strange, it happens only on high resolutions devices, mostly newer ones.
-
Hi!
Few users reported that it happens on new ipad which also has high resolution, can you point me in the right direction regarding this issue, what to investigate?
-
i tried with as higher resolution available on my desktop in editor (1920 width) and it worked fine. I dont know why users with androids and new ipad with higher resolution report this?
-
You might want to increase the max height on the UIRoot. If it's set to 1080 for example, then it means that after 1920x1080 the UI will no longer be "automatic" but will actually be manually scaled with a height of 1080.
-
Hi!
At first i did not know what is max height, then i realized i have to update gui to the latest version. simple importing from assets store worked, but it broke some other functionality (i have to investigate this further).
Also later i discovered that when i start a new project, and create new UI with NGUI on UIRoot i see new options, one of them is Max Height. Updating to the new version in the old projects did not reveal this new option, so i was wondering what you were talking about. can you confirm that this is not updated properly? since UIRoot does not reveal new options. Creating new UI in the old project does not reveal new options in the UIRoot
-
Be sure to follow the upgrade instructions in the readme file that involve deleting the NGUI folder from within a new scene prior to importing the updated package.
-
everything ok, thanks, i hope it will work now.
-
I am seeing the exact same issue. I just upgraded to the latest version (2.5.1 at the time of this post) using the upgrade instructions. I set the maximum height to 1920, which matches my test device. But I am still seeing the same problems.
One example of the problem sets text width based on screen width.
label.lineWidth = (int)(Screen.width*0.9f);
This works on all lower screen resolutions but cuts off on hi-res devices, just as the original post.
Did you ever find a solution or work around?
-
What device has height of 1920? 1920 is generally width, not height.
-
What device has height of 1920? 1920 is generally width, not height.
Could be a 1080p device in portrait.
-
I am using an HTC DNA, which is 1920 by 1080. I am using it in portrait mode, so Screen.width correctly reports 1080.
-
Any ideas? I don't mean to be a pest, but I have a commercial product based on NGUI that has to launch in a few days. As a tentative workaround I've come up with:
if(Screen.width < 1080){
label.lineWidth = (int)(Screen.width*0.9f);
}else{
label.lineWidth = (int)(Screen.width*0.9f * 0.4f); //extra scaling compensates for weirdness
}
But it seems kludgy and likely to break. Is 1080 even the right cut off value? Who knows.
-
Default max setting on the UICamera is 1080, but you say you changed that -- so there is no reason why this would be different. It would help to see what you meant by "cut off".
-
Here is an example. It is as if the width calculation is off for the hi-res devices.
-
Here are the settings.
-
remember that the width you set on the label for cutting it off is based on NGUI's virtual pixels, so if you don't change the manual height to be the correct size, you have to compensate. That is, the width you put in should fit the virtual height you have in the UIRoot (get the activeHeight property from it to see).
What is the cutoff width on the label?
-
I'm not sure I understand your question. Are you asking for the Max Width of the label? That's what I'm setting to be a fraction of the screen width, so it's different on every device.
The weird thing is that this works for all lower resolution screens as well as in the editor. So there must be some condition that flips somewhere? Could it be when the actual screen height exceeds the manual screen height property?
My understanding is that you design for the manual height property (i.e. if I use 1024 then a sprite 1000 pixels tall will just about fill the screen) and then the GUI will scale as long as the actual size is within the min/max height values.
-
When setting the max width on the label are you taking UIRoot.pixelSizeAdjustment into account?
-
No. I was unaware that I needed to. Is it a multiplier?
-
Yup.