Author Topic: FixedSize vs. Button Label vs. X-Position vs. 3D Object  (Read 2400 times)

fogman

  • Guest
FixedSize vs. Button Label vs. X-Position vs. 3D Object
« 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:





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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FixedSize vs. Button Label vs. X-Position vs. 3D Object
« Reply #1 on: June 12, 2013, 02:03:18 PM »
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

fogman

  • Guest
Re: FixedSize vs. Button Label vs. X-Position vs. 3D Object
« Reply #2 on: June 12, 2013, 04:12:45 PM »
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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FixedSize vs. Button Label vs. X-Position vs. 3D Object
« Reply #3 on: June 13, 2013, 04:00:22 AM »
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.