I cant believe I am that stupid, but once again I struggle on s.th. supposedly easy. And I can’t believe no one ever stumbled upon s.th. like this. (A google- and a forums search didn’t help)
I am trying to build a Button Widget to be reused in my UIs.
Lets say this Button has two different appearance. E.g. It can show an on and an off image, depending on other magic. And it changes this image, depending on the linked whatever is tuned on or off.
From an UI widget, where this button is used, I would call the onClicked event on the Button and maybe call the toggle function inside this button. But, what if I want this button widget to react on its onClicked itself? Like it would be in C#:
this.OnClicked += doSomeMagic…
How would I do that?
I hope you understand what I am trying to archive.
Any help would really be appreciated.
Thanks in advance,
Ahh, I forgot… My hope was:
But this doesn’t fire.