比如我想添加一个按钮,可以在helloworld.cpp的init里面
auto Text = TextField::create(“username”, “DroidSansFallback”, 30);
this->addChild(Text);
但我在a.cpp里该怎么往hellworld界面添加按钮呢。
比如我想添加一个按钮,可以在helloworld.cpp的init里面
auto Text = TextField::create(“username”, “DroidSansFallback”, 30);
this->addChild(Text);
但我在a.cpp里该怎么往hellworld界面添加按钮呢。