Hello Guest

Author Topic: which button is calling the function ?  (Read 3390 times)

N93

  • Newbie
  • *
  • Posts: 1
    • View Profile
which button is calling the function ?
« on: July 27, 2014, 08:46:48 am »
consider I have six buttons that do same work so  I write one function  that use for all of them (example : answer question )
but in this function I need to know who call the function, button 1 or button 6  or ...
How can I understand which button call the function ?
I use the 2dtoolkit Basic button



 



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: which button is calling the function ?
« Reply #1 on: July 27, 2014, 02:08:06 pm »
The functions can take an optional tk2dUIItem parameter, which will be the object that triggered it.