-
DJEclipseLikes 0Problem Description
I’m curious about how the Cocos2D-x UI System works. To be specific, I would like to know how the UI Button class handles touches under the hood. Right now, all I know is that buttons have touch event listeners that handle the touches with callbacks. Can anyone elaborate on how callbacks and touch event listeners work to recognize and handle touches?
-
Sonar Systems adminLikes 0
In what sense, are you looking to modify the Cocos2d-x engine.
-
DJEclipseLikes 0
Yea. I have been considering modifying the button class or creating my own button class, but I mostly want to just learn about how the buttons work.
-
Sonar Systems adminLikes 0
I think this will be helpful http://discuss.cocos2d-x.org/t/how-do-cocos-studio-button-callbacks-work/19816
-
DJEclipseLikes 0
Thanks for the link, but it doesn’t quite explain what I want to know. I’ve been able to use UI Buttons in the past.
I think I’m being unclear. I’m actually looking to understand how Touch Event Listeners work. If I wanted to create my own touch event listener class (even though it would be pointless to do so), how would I do it? I really just want to learn how it all works. I don’t actually have a real need for it.
-
Sonar Systems adminLikes 0
Login to reply