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 - FOX_ITA

Pages: [1]
1
Hi,

thanks to reply. I just wanna center on the last child. Now i'm only using UICenterOnChild.CenterOn using the last object ( profile ) but all the time is centered on the first child..!

i removed the SpringPanel...

thanks

EDIT : i've fixed. Was simple. I just wanna center instantly after the item creation, but i understood that the place of creation was under the first item and then moved. So i delayed the OnCenter call and everything work now!!

2
NGUI 3 Support / ScrolloView scroll automatically to last children, please
« on: February 03, 2014, 11:38:02 AM »
Hello guys,

im having some troubles how the scrollview works and how to get my things works.

the scripts above :

  1. GameObject profile = NGUITools.AddChild(m_profilesGrid.gameObject, prefabPlayerProfile);
  2.                 UIButton button = profile.GetComponentInChildren<UIButton>();
  3.                 UIEventListener.Get(button.gameObject).onClick += this.OnPlayerSelection;
  4.                 m_profilesGrid.repositionNow = true;
  5.  
  6.                 UILabel profileLabel = profile.GetComponentInChildren<UILabel>();
  7.                 Debugger.Assert(profileLabel != null);
  8.  
  9.                 profileLabel.text = Game.State.GetProfile(profileIndex).Name;
  10.  
  11.                 UIPanel mPanel;
  12.                 UICenterOnChild mCenter;
  13.                
  14.  
  15.                 mCenter = NGUITools.FindInParents<UICenterOnChild>(profile.gameObject);
  16.                 mPanel = NGUITools.FindInParents<UIPanel>(profile.gameObject);
  17.  
  18.                 mCenter.CenterOn(profile.transform);
  19.                 SpringPanel.Begin(mPanel.cachedGameObject, mPanel.cachedTransform.InverseTransformPoint(profile.transform.position), 6f);
  20.  

The child is added correctly in row but if i move the slider to last one or another position, all the time brings me to the first.

Instead of this behaviour i'd like to move to the last one added.

Can you help me please?

many thanks!

3
NGUI 3 Support / TouchScreenKeyboard.hideInput issue
« on: January 31, 2014, 10:09:39 AM »
Hello there,

i'm having hard time with the TouchScreenKeyboard.hideInput = true !

I'm using an UIInput object and a textfield (UILabel) to fill the input from the keyboard and it works, but i wanna remove the upper part of the keyboard where the input preview is.
So i found that i've to use hideInput = true flag.

So just to test it i put into my Update() method inside my script but nothing happen.

Any suggestion?

I'm using Unity 4.3.3f1 and NGUI 3.0.8 f7

Many thanks!!

4
NGUI 3 Support / Re: UIGrid, how to get the index from a child
« on: January 28, 2014, 07:50:51 AM »
Thanks a lot,

i'm gonna test it right now!

5
NGUI 3 Support / UIGrid, how to get the index from a child
« on: January 27, 2014, 03:27:09 PM »
Hello there,

i'm pretty new to NGUI and i'm using it a lot.
But i can't figure out hot to determinate the index of a child clicked on the UIGrid.

I got a UIScrollView with attached an UIGrid with as a children different UIButtons.

How can i get the index or position of pressed button in the grid?

for example if i click on the first one i can see that is pressed the item 0 into the UIGrid.

Many thanks,

cheers!

Pages: [1]