public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, string fontName, float fontSize) { CCTextFieldTTF cCTextFieldTTF = new CCTextFieldTTF(); if (cCTextFieldTTF == null || !cCTextFieldTTF.initWithString("", fontName, fontSize)) { return(null); } if (placeholder != null) { cCTextFieldTTF.PlaceHolder = placeholder; } return(cCTextFieldTTF); }
/** creates a CCLabelTTF from a fontname and font size */ public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, string fontName, float fontSize) { CCTextFieldTTF pRet = new CCTextFieldTTF(); if (pRet != null && pRet.initWithString("", fontName, fontSize)) { //pRet->autorelease(); if (placeholder != null) { pRet.PlaceHolder = placeholder; } return pRet; } //CC_SAFE_DELETE(pRet); return null; //throw new NotFiniteNumberException(); }
/** creates a CCLabelTTF from a fontname and font size */ public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, string fontName, float fontSize) { CCTextFieldTTF pRet = new CCTextFieldTTF(); if (pRet != null && pRet.initWithString("", fontName, fontSize)) { //pRet->autorelease(); if (placeholder != null) { pRet.PlaceHolder = placeholder; } return(pRet); } //CC_SAFE_DELETE(pRet); return(null); //throw new NotFiniteNumberException(); }