예제 #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);
        }
예제 #2
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();
        }
예제 #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();
        }