Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: fogman on June 12, 2013, 01:45:01 PM
-
Hi,
I got a problem and halfways a solution to it.
To explain it, I´ve attached two pics:
(http://www.indiegamedeveloper.org/stuff/menu1.jpg)
(http://www.indiegamedeveloper.org/stuff/menu2.jpg)
The grid in the background is a 3D model, displayed through my Main Camera (Orthografic, with a size of 23).
It must be a 3D model and it must be displayed by the main cam, because it´s the playfield.
UIRoot is set to "FixedSize".
In Front of it you can see a blue NGUI button with an UIAnchor attached to it. Now I got two problems:
In the first picture the button is nicely aligned with the grid.
In the second picture, it´s aligned on the y axis, but not on the x axis.
When the window gets smaller, the button will move to the left.
I want it to be nailed on the grid, so to say.
The second problem is that "FixedSize" will (of course) make my font ugly.
Is there any possibility to have the button nicely aligned, along with the text label and with a crisp font?
-
That's what happens when the aspect ratio changes and you have stuff anchored to the left side of the screen. Change the anchor to center. And in general in this case there is no reason to use more than one anchor like so:
UIRoot
- Camera
-- Anchor
--- Panel
---- Button 1
---- Button 2
---- Button 3
-
You are my hero! 8)
Any idea how i could force the button label to stay at its size / staying crisp even if UIRoot is set to FixedSize and the screen size changes?
-
If the UIRoot is set to fixed size, then your UI is not pixel perfect, and you can't get a fully crisp look. Only pixel perfect UIs are completely crisp.