Author Topic: Problems with MakePixelPerfect and anchored Elements  (Read 2950 times)

Rajken

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 12
    • View Profile
Problems with MakePixelPerfect and anchored Elements
« on: February 25, 2014, 06:13:58 AM »
Hi,
In the latest version I get some problem with UITexture not scaling correctly when they are anchored to stretch.

The problem is that i use RetinaPro that will call the MakePixelPerfect at startup and the latest version of NGUI will now correct the anchors so texture will fit perfectly. But I think the MakePixelPerfect function should not change the width or height if the anchors is setup to stretch the texture.
So if left anchor and right anchor is anchored to opposite direction the MakePixelPerfect should be ignored and the same for top and bottom.

I don't know if this change will break something else maybe you know Aren?
I will change this locally but it would be nice if it was added to a future version if it don't cause problem for someone else.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems with MakePixelPerfect and anchored Elements
« Reply #1 on: February 25, 2014, 01:47:56 PM »
The point of MakePixelPerfect is to correct the current dimensions of the widget to make it pixel-perfect, crisp. The fact that it wasn't doing it before is a problem. The way it is now is the intended behaviour.

Why is RetinaPro calling it if it doesn't want it to resize?