cocos2d iphone - How to prevent CCMenuItemLabel or CCMenu from changing font size on tapping? -


when tap on ccmenuitemlabel made cclabelttf, i'm getting animation text increases in size while tapped, , botches interface. how fix that? don't want menu react on tapping. have not found relevant in ccmenuitemlabel or in ccmenuitem or in ccmenu.

i have found code ccmenuitemlabel:

-(void) selected {     // subclass change default action     if(_isenabled) {         [super selected];          ccaction *action = [self getactionbytag:kcczoomactiontag];         if( action )             [self stopaction:action];         else             _originalscale = self.scale;          ccaction *zoomaction = [ccscaleto actionwithduration:0.1f scale:_originalscale * 1.2f];         zoomaction.tag = kcczoomactiontag;         [self runaction:zoomaction];     } }  -(void) unselected {     // subclass change default action     if(_isenabled) {         [super unselected];         [self stopactionbytag:kcczoomactiontag];         ccaction *zoomaction = [ccscaleto actionwithduration:0.1f scale:_originalscale];         zoomaction.tag = kcczoomactiontag;         [self runaction:zoomaction];     } } 

as turns out, runs zoom action, way override besides subclassing menu item?

i dont think want pause director

i overriding ccmenuitemlabel

look @ following method:

-(void) selected  {     // subclass change default action     if(isenabled_) {         [super selected];          ccaction *action = [self getactionbytag:kcczoomactiontag];         if( action )             [self stopaction:action];         else             originalscale_ = self.scale;          ccaction *zoomaction = [ccscaleto actionwithduration:0.1f scale:originalscale_ * 1.2f];         zoomaction.tag = kcczoomactiontag;         [self runaction:zoomaction];     } } 

i remove zoom action wierd default scaling

[ccscaleto actionwithduration:0.1f scale:originalscale_ * 1.2f]; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -