Hi,
I have a CCMenu + CCMenuItemFont, when I click the CCMenuItemFont it is scaled up a bit until I release the touch.
My question is, can I change so that the CCMenuItemFont is not scaled up when I touch it?
A fast, easy to use, free, and community supported 2D game engine
Hi,
I have a CCMenu + CCMenuItemFont, when I click the CCMenuItemFont it is scaled up a bit until I release the touch.
My question is, can I change so that the CCMenuItemFont is not scaled up when I touch it?
Yep. You can either change the method inside CCMenuItem class so that it doesn't perform the scale up action. Or you could subclass a CCMenuItem and make your menu item behave how you want to.
Make a subclass of CCMenuItemFont and do this in it:
-(void) selected
{
// Do whatever you want (or nothing), but don't call super.
}
-(void) unselected
{
// Do whatever you want (or nothing), but don't call super.
}Thanks
You must log in to post.