Author Topic: [UILabel] Snap and Make Pixel Perfect.  (Read 4399 times)

sandolkakos

  • Newbie
  • *
  • Thank You
  • -Given: 16
  • -Receive: 1
  • Posts: 17
    • View Profile
[UILabel] Snap and Make Pixel Perfect.
« on: February 07, 2014, 12:12:32 PM »
Hi ArenMook,

I've noticed that in the 3.4.8 version, the Snap and Make Pixel Perfect are Resizing the Widget.Dimensions to match with Font Size. This is happening even when Overflow is ShrinkContent, but this was not happening in 3.3.3 (previously 3.0.8 f4) version.

Is this intentional?

And also, the Sprite using "Sprite Type: Simple", happens the same thing. This already happens with Sprite since I started to use NGUI.

I don't know about other developers, but I think it would be a good thing not resize Dimensions of Sprite/UILabel when using Snap or Make Pixel Perfect.  :P

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [UILabel] Snap and Make Pixel Perfect.
« Reply #1 on: February 08, 2014, 03:06:11 PM »
Well, the purpose of the Snap/MakePixelPerfect option on widgets is to have it assume the "native" dimensions -- which in font's case means using whatever dimensions are necessary to print the text in its native size. Personally I found the workflow of having the label default to "shrink" and Snap doing nothing to be annoying. So it was either change the shrink option to something else, which I didn't want to do, or make snap work as I would expect, which made more sense.

mimminito

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: [UILabel] Snap and Make Pixel Perfect.
« Reply #2 on: March 13, 2014, 10:04:33 AM »
So is there a solution we can use for this? I am using RetinaPro which helps a great deal with work load involved with Atlases, but it broadcasts a MakePixelPerfect call and therefore causes all of the labels to change their dimensions...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [UILabel] Snap and Make Pixel Perfect.
« Reply #3 on: March 14, 2014, 12:24:21 PM »
Talk to the author of RetinaPro, and ask him to change that broadcast to something else, or just remove it entirely.

mimminito

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: [UILabel] Snap and Make Pixel Perfect.
« Reply #4 on: March 20, 2014, 05:53:36 AM »
Then surely that would break RetinaPro? How else are we supposed to ensure when we switch an atlas that the sprites etc are updated to be pixel perfect without broadcasting that function?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [UILabel] Snap and Make Pixel Perfect.
« Reply #5 on: March 20, 2014, 12:36:58 PM »
Ask its author regarding what he was trying to do?

MakePixelPerfect should not be called after switching atlases.