[Tip] adding a ui.Button to a ui.Label as a subview
Phuket2 last edited by
This is a simple error to make I think. I added a btn to a label as a subview. For the life of me, I could not get the button to call it's action func. After way too long I thought about the touch_enabled attr. Sure enough, that's all it was. It makes sense that for a label that by default, touch_enabled == False.
I am surprised I haven't hit this problem before. Possibly there was a change between 1.5 and 1.6. I did a lot with ui in 1.5, esp combining views. I feel I would have remembered this issue.
Anyway, something to keep in mind, I am sure you have to think like this when combining other variations of ui Elements