Author Topic: Don't think I can convert project to new NGUI  (Read 5364 times)

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
Don't think I can convert project to new NGUI
« on: January 22, 2014, 11:01:29 PM »
Our game uses a size 8 pixel font and a UI size of 144 to create a pixel perfect size UI to meet our tk2d size pixel perfect world.  Upon trying to update to the new NGUI I ran into a major problem with the font.  The old system allowed you to change the "font size" from 5 to 6 for example which gave me the size I wanted in the inspector transform.

The new system seems to "snap" my font size in really large increments when I use the height option.  Not sure why this is occuring, but I imagine it's because of the tiny font size I use?  On screen changing the height by 1 is just way too big of a change in font size, so I have no way to correctly size the font.
« Last Edit: January 22, 2014, 11:06:32 PM by Majicpanda »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Don't think I can convert project to new NGUI
« Reply #1 on: January 23, 2014, 05:54:42 AM »
NGUI 3 snaps to pixels when moving widgets, and since your UI size is 144 it means you only have 144 pixels to work with. Why are you trying to match tk2d? Use a different camera for NGUI and you won't be running into such problems.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Don't think I can convert project to new NGUI
« Reply #2 on: January 23, 2014, 09:36:49 AM »
"144 pixels ought to be enough for anybody" - Bill Gates.

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
Re: Don't think I can convert project to new NGUI
« Reply #3 on: January 23, 2014, 02:01:41 PM »
I'm not trying to use the same camera as tk2d, I'm simply matching the size of the pixels on screen to it so that the games pixel perfect nature appears parallel.  I could double the res for uiroot to 288 but then the "square" pixels for all the game would be half the size to that of the game.. if that makes any sense.

If that's our only option we may end up going with it, it would allow for more detail in our UI anyway.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Don't think I can convert project to new NGUI
« Reply #4 on: January 24, 2014, 09:25:05 AM »
I wouldn't try to match it at all. UI is supposed to be crisp, and for it to be crisp it should ideally be pixel-perfect. You say yourself you want it to be pixel perfect, but forcing it to be 144 pixels tall is anything but, unless your actual device is only 144 pixels tall, which I highly doubt.