Merge commit 'refs/pull/6197/head' of git://github.com/cocos2d/cocos2d-x into pull/6197

This commit is contained in:
James Chen 2014-04-10 11:21:16 +08:00
commit 150e73ba62
1 changed files with 5 additions and 11 deletions

View File

@ -67,13 +67,11 @@ static const int CC_EDIT_BOX_PADDING = 5;
-(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox
{
self = [super init];
do
{
if (self == nil) break;
if(self){
editState_ = NO;
self.textField = [[[CCCustomUITextField alloc] initWithFrame: frameRect] autorelease];
if (!textField_) break;
//TODO: what is the line below doing?
//if (!textField_) break;
[textField_ setTextColor:[UIColor whiteColor]];
textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here.
textField_.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
@ -84,13 +82,9 @@ static const int CC_EDIT_BOX_PADDING = 5;
textField_.returnKeyType = UIReturnKeyDefault;
[textField_ addTarget:self action:@selector(textChanged) forControlEvents:UIControlEventEditingChanged];
self.editBox = editBox;
return self;
}while(0);
}
return nil;
return self;
}
-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance