Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tallen

Pages: [1]
1
NGUI 3 Support / Re: Centre-aligning grouped content
« on: May 13, 2016, 03:47:33 AM »
In which case, as I initially suspected, it's not possible to do what I want without additional support from our code team. My problem is that the label could be a different length each time the scene loads, so manually adjusting its position isn't a solution.

2
NGUI 3 Support / Re: Centre-aligning grouped content
« on: May 06, 2016, 04:20:13 AM »
Why is your content root anchored to the envelope? That makes zero sense. Your envelope resizes itself based on the content root, and you have content root resize itself based on the envelope? How is that supposed to work? Get rid of that anchor.

Then how do I manipulate the position of Content Root? All I end up with is a game object that is set to the size of Content Root, but no means of repositioning Content Root itself or any of its children? I realise I'm probably missing something obvious, but being able to change the size of the Envelope Content gameobject seems to offer me no means to influence the positioning of its siblings.

3
NGUI 3 Support / Re: Centre-aligning grouped content
« on: May 05, 2016, 08:36:07 AM »
Thank you for the update. I've been tinkering with my test scene for a few hours now, and I can't get this to work as expected. Here's an assembled screenshot of the results of two different label sizes:



Each time I execute the Envelope Content script, the Transform that it's attached to acquires either a positive or negative X value, despite being initially set to 0. The Content Root Transform inherits the same X value, despite being anchored to the left and right of Envelope Content. If I repeatedly execute the script with the scene running, Envelope Content creeps a little more to the left or right. In addition, the children of Content Root (Icon and Label) are also offset visually, despite their transforms showing as 0.

Can what I want be achieved without any additional code, or do I need a custom script in the scene to reposition the content? I'm an artist, not a programmer, and I'm trying to get this to work without having to get the code team involved if I can. I assume I'm just doing something silly, but I've exhausted all the permutations of anchors/pivots etc. that I can think of.

4
NGUI 3 Support / Re: Centre-aligning grouped content
« on: May 03, 2016, 06:28:31 AM »
Thanks for the reply. Unfortunately, I can't get this to work for me. I've set up a test scene with the following hierarchy:



However, changing the string in the 'Text' of the UIlabel text has no effect on the positioning of any of the content, either in the editor or with the scene running. I assume I'm missing something, but consulting the help for UIWrap Content didn't provide any clues about what that might be.

I made the whole content the child of a gameobject with a Scroll View component attached, as UIWrap Content warned that it wouldn't work properly without it. My test project is using Unity 4.7.1 and NGUI 3.9.8.

5
NGUI 3 Support / Centre-aligning grouped content
« on: April 29, 2016, 09:02:25 AM »
I've searched this forum as thoroughly as I can, but can't find a solution to what seems like a simple problem:



I have buttons what contain a currency icon (sprite), and a variable numerical amount. Is it possible to align the parent of these game objects (labelled as Group Container) so that they stay centre-aligned inside the Button Parent, regardless of the size of the label?

Pages: [1]