Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17075

How to inherit ui button class

$
0
0

@vitek wrote:

I want to inherit Button class, but i get error, why?

MyButton::MyButton() : Button()
{

}

MyButton* MyButton::create()
{
    auto button = new MyButton();
    if (button) 
    {
        button->autorelease();
        return button;
    }
    CC_SAFE_DELETE(button);
    return nullptr;
}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>