-
amishaLikes 0Problem Description
sir i am using the listview for item scroll>now i want get touch event of item of listview .i implement this code
in listview i use imageview as a scroll ietm.Now i want to change the texture on specifie imageview.
call function:
lv_slidebar->addEventListener(CC_CALLBACK_2( HelloWorld::selectedItemEvent, this));
implementation:
void HelloWorld::selectedItemEvent(Ref *sender, ListView::EventType type)
{
ImageView *menuItem = static_cast<ImageView *>( sender );
int tag=menuItem->getTag();
cocos2d::__String *str = String::createWithFormat("level1_gogls%d.png", tag);
Gogals->setOpacity(250);
Gogals->setTexture(Director::getInstance()->getTextureCache()->addImage(str->getCString()));
}
-
Sonar Systems adminLikes 0
What;s the problem?
-
amishaLikes 0
now this issue is solve.
-
Sonar Systems adminLikes 0
Great :D
Login to reply