playMaker

Author Topic: NGUI Playmaker on.Center --->  (Read 3034 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
NGUI Playmaker on.Center --->
« on: April 15, 2016, 10:28:58 AM »
I was wondering if anyone knew if there was a playmaker action that pushes an event through when an object is centered in a NGUI scrollview.

I am trying to achieve a list of characters in a scrollview, and when one is centered, I need those dots at the bottom to match the character that is centered.

I just need that action if anyone would please help me.

Thanks

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: NGUI Playmaker on.Center --->
« Reply #1 on: April 18, 2016, 04:57:18 AM »
Anyone? please.

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: NGUI Playmaker on.Center --->
« Reply #2 on: April 19, 2016, 09:30:25 AM »
???

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Playmaker on.Center --->
« Reply #3 on: April 20, 2016, 02:16:34 AM »
Hi,

 I am not sure there is a function for this actually.

 I would first ask on Tasharen forum how to do this programmatically, then give me the link to the asnwer, and I'll port this as an action if possible.

It seems you can force an item of a list to center itself within the scroll view, but I found no callback to get the information of what item is currently centered.

Bye,

 Jean

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: NGUI Playmaker on.Center --->
« Reply #4 on: November 02, 2016, 10:08:47 AM »
Late reply,

but now I really need this urgently.

Here is what he said ------------>

GetComponent<UICenterOnChild>().onCenter = YourCallback;

just cannot get it to work though.

Please help

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Playmaker on.Center --->
« Reply #5 on: November 04, 2016, 05:34:31 AM »
Hi,

can you make a test scene with a simple scrolling view and few items and this component, then I'll see how to plug that in within PlayMaker.

thanks :)

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Playmaker on.Center --->
« Reply #6 on: November 04, 2016, 06:02:58 AM »
Hi,

 Can you try this package attached. I think it works.

 Use the playmaker event ngui component as usual, there is a new global event for it.



If all is good, I'll put it on the Wiki and ecosystem.

 Bye,

 Jean

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: NGUI Playmaker on.Center --->
« Reply #7 on: November 08, 2016, 05:56:53 AM »
Hey thank you so much for this Jean,

It's perfect!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Playmaker on.Center --->
« Reply #8 on: November 09, 2016, 02:15:55 AM »
Hi,

 Excellent, I am glad it works.

Bye,

 Jean