Cocos2D-X UI System

  • DJEclipse
    Likes 0

    Problem 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 admin
    Likes 0

    In what sense, are you looking to modify the Cocos2d-x engine.

  • DJEclipse
    Likes 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 admin
    Likes 0

  • DJEclipse
    Likes 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.

Login to reply