ioscocos2d-iphoneccmenuitemcclabelttf

How do i remove the hover scale on CCMenuItemLabel?


I have a CCMenuItemLabel on my scene, and when I press and hold my finger on the label it grows in size. Now I dont want that and I dont know how to do this.

I've searched for cocos2d ccmenuitemlabel hover but didnt find what I was searching for.


Solution

  • Extend CCMenuItemLabel and override two methods

    -(void) selected {
        if(isEnabled_) {
            isSelected_=YES;
            // do your own anim here (or not !)
        }
    }
    
    -(void) unselected {
        if(isEnabled_) {
            isSelected_=YES;
            // undo whatever you did 
        }
    }