playMaker

Author Topic: NGUI Detect Button Overlap  (Read 3130 times)

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
NGUI Detect Button Overlap
« on: May 20, 2013, 02:54:27 PM »
Hi all,
I'm using NGUI to create a number of buttons in my game.  Each of these buttons holds a number, and I would like to be able to drag and drop the buttons on top of each other to add the numbers.

I'm using the "UIDrag Object" script that comes with NGUI on each button, and the dragging and dropping behavior seems to work fine (when dropped the buttons move back to their original position).  I can't figure out how to get buttons to detect when they've been dropped over other buttons, however.  I tried a "Collision Event" Action and using a tag for all the buttons, but it doesn't seem to be detecting any overlap.

Any thoughts or suggestions?

Thanks so much,
Jenna

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Detect Button Overlap
« Reply #1 on: May 21, 2013, 02:44:44 AM »
Hi,

 I guess with the last fix I did on the other thread, you will now be able to have the "onDrop" event from Ngui in Playmaker.

 can you confirm?

bye,

 Jean

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
Re: NGUI Detect Button Overlap
« Reply #2 on: May 21, 2013, 01:51:12 PM »
I believe it is working, thank you!  I'm still trying to get the whole thing working top to bottom as I want, but I think it's going to be a bit more of a project than I anticipated.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Detect Button Overlap
« Reply #3 on: May 22, 2013, 01:04:44 AM »
Hi,

 good. Most projects end up bigger then expected... ;D

Bye,

 Jean