Beispiel #1
0
        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();
 }
Beispiel #3
0
        /** 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();
        }