MenuItemToggle用法

	MenuItemImage* playImg = MenuItemImage::create("play.png", "pause.png");
	MenuItemImage* pauseImg = MenuItemImage::create("pause.png","play.png");
	MenuItemToggle* tog = MenuItemToggle::createWithCallback(CC_CALLBACK_1(Ingame::toggleOnTouchCallBck,this), pauseImg, playImg,nullptr);
	Menu *menu = Menu::create();
	menu->setPosition(Point(100,100));
	menu->addChild(tog);
	addChild(menu);

void Ingame::toggleOnTouchCallBck(Object* obj)
{

}


你可能感兴趣的:(MenuItemToggle用法)