Hello Guest

Author Topic: pass a parameter to the event  (Read 4848 times)

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
pass a parameter to the event
« on: July 16, 2013, 11:53:18 pm »
Hello!

I want to pass a parameter to the event.
Are there any standards methods for tk2dUI events?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: pass a parameter to the event
« Reply #1 on: July 16, 2013, 11:54:48 pm »
No there isn't. You do get a reference to the current tk2dUIItem, you can use that to identify where it came from.

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: pass a parameter to the event
« Reply #2 on: July 17, 2013, 01:31:01 am »
How I can get reference to the current tk2dUIItem? I don't understand that.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: pass a parameter to the event
« Reply #3 on: July 17, 2013, 10:44:31 am »
Use the OnDownUIItem action instead of OnDown - that variant will pass a parameter (i.e. the caller) to the event.

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: pass a parameter to the event
« Reply #4 on: July 17, 2013, 11:04:39 pm »
thank you.