Things I didn’t know about Cocos2d-x, but I probably could have read in the docs somewhere #6

You can only resize the Buttons around the size of its text using the content size of the inner Label, which is called the _titleRenderer. Here’s a working lambda you can shove into your game. I suggest enabling Scale9.

    auto resize_btn = [](ui::Button* button) {
        auto lbl_size = button->getTitleRenderer()->getContentSize();

        button->setContentSize(
            Size(
                lbl_size.width * 1.1f,
                lbl_size.height * 1.1f
            )
        );
    };

Things I didn’t know about Cocos2d-x, but I probably could have read in the docs somewhere #4

If you have the same Scene on the Director’s Scene stack, either by runWithScene or with pushScene, if you pop one off, it’ll call release on it, and effectively destroy it, making any further operations on the Scene impossible.

To resolve this, you need to call retain() on the scene, to tell cocos that somewhere else is using the scene.