Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Vaei on January 18, 2014, 04:12:00 AM

Title: Generating NGUI from Code - How to align labels?
Post by: Vaei on January 18, 2014, 04:12:00 AM
Hi,

I have started to create a script that generates labels & (soon) buttons based on how many inputs I have setup in a custom input manager, it is a screen to allow users to change their inputs.

Unfortunately since I can't tell the text to align to the left of the box they are all centred and it looks UGLY. I need them all aligned to the left.

How can I achieve this?

And also, why are dynamic fonts blurry/pixelated?
Title: Re: Generating NGUI from Code - How to align labels?
Post by: ArenMook on January 18, 2014, 10:27:52 PM
UITable can do that, or just use math yourself. If you know the dimensions of the widget, positioning the next one with an offset should be a trivial matter.

As for blurry/pixelated -- by default labels are set to shrink their content. You might want to change that to something else, such as "resize freely".