Exemple #1
0
        public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            CCTextFieldTTF cCTextFieldTTF = new CCTextFieldTTF();

            if (cCTextFieldTTF == null || !cCTextFieldTTF.initWithPlaceHolder("", dimensions, alignment, fontName, fontSize))
            {
                return(null);
            }
            if (placeholder != null)
            {
                cCTextFieldTTF.PlaceHolder = placeholder;
            }
            return(cCTextFieldTTF);
        }
        //char * description();

        //////////////////////////////////////////////////////////////////////////
        // static constructor
        //////////////////////////////////////////////////////////////////////////

        /** creates a CCTextFieldTTF from a fontname, alignment, dimension and font size */
        public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            CCTextFieldTTF pRet = new CCTextFieldTTF();
            if (pRet != null && pRet.initWithPlaceHolder("", dimensions, alignment, fontName, fontSize))
            {
                //pRet->autorelease();
                if (placeholder != null)
                {
                    pRet.PlaceHolder = placeholder;
                }
                return pRet;
            }
            //CC_SAFE_DELETE(pRet);
            return null;
            throw new NotFiniteNumberException();
        }
Exemple #3
0
        //char * description();

        //////////////////////////////////////////////////////////////////////////
        // static constructor
        //////////////////////////////////////////////////////////////////////////

        /** creates a CCTextFieldTTF from a fontname, alignment, dimension and font size */
        public static CCTextFieldTTF textFieldWithPlaceHolder(string placeholder, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            CCTextFieldTTF pRet = new CCTextFieldTTF();

            if (pRet != null && pRet.initWithPlaceHolder("", dimensions, alignment, fontName, fontSize))
            {
                //pRet->autorelease();
                if (placeholder != null)
                {
                    pRet.PlaceHolder = placeholder;
                }
                return(pRet);
            }
            //CC_SAFE_DELETE(pRet);
            return(null);

            throw new NotFiniteNumberException();
        }