闪闪亮的新手问题:
在项目中引入了cocostudio的UI组件之后 ,想要获得某个图像类型的ui组件位置,但是没有成功,问题在哪呢?
我的方法是
Layout* SlotPanel = static_cast< Layout*>( UIHelper::seekWidgetByName(map_root, "SlotPanel" ));
ImageView*weapon_Slot01=static_cast <ImageView *>(SlotPanel->getChildren()->objectAtIndex(0));
CCSprite*Weapon01= CCSprite::create("Candy01.png");
SlotPanel->addChild(Weapon01,0);
Weapon01->setPosition(weapon_Slot01->getposition());
谢谢!