Author Topic: NGUI: drag from button A to B and then to the screen  (Read 1327 times)

brian661

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
NGUI: drag from button A to B and then to the screen
« on: August 26, 2014, 08:34:58 AM »
In my game, there are 2 rows of button, say A B C D E F, 
row with button A B C is on the button of the screen,   
and row with D E F just some distance above the ABC row. 

Players are just allow to start drag from first row, 
then to the second row, and drag out finally(say to the top of the screen), 
and print the result, say print AD if player pass through button A and D.



By using the eventTrigger Script from NGUI, 
I success to drag from the first row of the button and call a function to store the button name using drag out.
But how can i continue this dragging to test another drag out on button D? 
As more button will be add to the game, I would like to avoid doing calculation. 
Thank in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: drag from button A to B and then to the screen
« Reply #1 on: August 27, 2014, 04:08:10 AM »
Set UICamera.onDragOver, and you will be getting a copy of all the notifications regardless of which button will receive it.