playMaker

Author Topic: Add button into scroll view (nGUI) dynamically  (Read 6532 times)

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Add button into scroll view (nGUI) dynamically
« on: October 26, 2013, 01:49:41 AM »
How can I do that? Sorry if this post should be in nGUI forum.

I just want it work exactly like iOS TableView.

1. Count number of available items
2. Add them all in to a scrollView (nGui)
3. Remove/add clicked icon, refresh/update view

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Add button into scroll view (nGUI) dynamically
« Reply #1 on: October 26, 2013, 02:01:42 AM »
Hi,

Use the NguiAddChild Custom action shipped with the playmaker bridge package.

https://hutonggames.fogbugz.com/default.asp?W1111

Check out the example 9 (Quest log) on the playmaker examples, it's a scroll list where I add several rows, you would do the same with a scroll list.

 If you run into trouble, let me know.

bye,

 Jean

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: Add button into scroll view (nGUI) dynamically
« Reply #2 on: October 26, 2013, 02:23:16 AM »
Thank you much jean,

How can I remove one of these row? is there any "Ngui Tools Remove Child".
Or just clean them all then do add-child process again? Sound like a refresh button, isn't it O_O

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Add button into scroll view (nGUI) dynamically
« Reply #3 on: October 26, 2013, 03:17:39 AM »
Hi,

 I am not sure actually, get back to me on this next week, thanks.

bye,

 Jean,