mirror of https://github.com/axmolengine/axmol.git
commit
575c5101c7
|
@ -71,10 +71,10 @@ bool ControlButton::initWithLabelAndBackgroundSprite(Node* node, Scale9Sprite* b
|
||||||
{
|
{
|
||||||
if (Control::init())
|
if (Control::init())
|
||||||
{
|
{
|
||||||
CCASSERT(node != nullptr, "Label must not be nil.");
|
CCASSERT(node != nullptr, "node must not be nil.");
|
||||||
LabelProtocol* label = dynamic_cast<LabelProtocol*>(node);
|
LabelProtocol* label = dynamic_cast<LabelProtocol*>(node);
|
||||||
CCASSERT(backgroundSprite != nullptr, "Background sprite must not be nil.");
|
CCASSERT(backgroundSprite != nullptr, "Background sprite must not be nil.");
|
||||||
CCASSERT(label != nullptr || backgroundSprite != nullptr, "");
|
CCASSERT(label != nullptr, "label must not be nil.");
|
||||||
|
|
||||||
_parentInited = true;
|
_parentInited = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue