Esempio n. 1
0
        //////////////////////////////////////////////////////////////////////////
        // initialize
        //////////////////////////////////////////////////////////////////////////

        /** initializes the CCTextFieldTTF with a font name, alignment, dimension and font size */
        public bool initWithPlaceHolder(string placeholder, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            if (placeholder != null)
            {
                //CC_SAFE_DELETE(m_pPlaceHolder);
                m_pPlaceHolder = placeholder;
            }

            return(cclabelttf.initWithString(m_pPlaceHolder, dimensions, alignment, fontName, fontSize));
            //throw new NotFiniteNumberException();
        }
        /// <summary>
        /// creates a CCLabelTTF from a fontname, alignment, dimension and font size
        /// </summary>
        public static CCLabelTTF labelWithString(string label, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            CCLabelTTF pRet = new CCLabelTTF();
            if (pRet != null && pRet.initWithString(label, dimensions, alignment, fontName, fontSize))
            {
                return pRet;
            }

            return null;
        }
Esempio n. 3
0
        /// <summary>
        /// creates a CCLabelTTF from a fontname and font size
        /// </summary>
        public static CCLabelTTF labelWithString(string label, string fontName, float fontSize)
        {
            CCLabelTTF pRet = new CCLabelTTF();
            if (pRet.initWithString(label, fontName, fontSize))
            {
                return pRet;
            }

            return null;
        }
Esempio n. 4
0
        public static CCLabelTTF labelWithString(string label, string fontName, float fontSize)
        {
            CCLabelTTF cCLabelTTF = new CCLabelTTF();

            if (cCLabelTTF.initWithString(label, fontName, fontSize))
            {
                return(cCLabelTTF);
            }
            return(null);
        }
Esempio n. 5
0
        public static CCLabelTTF labelWithString(string label, CCSize dimensions, CCTextAlignment alignment, string fontName, float fontSize)
        {
            CCLabelTTF cCLabelTTF = new CCLabelTTF();

            if (cCLabelTTF != null && cCLabelTTF.initWithString(label, dimensions, alignment, fontName, fontSize))
            {
                return(cCLabelTTF);
            }
            return(null);
        }
Esempio n. 6
0
        public static CCLabelTTF labelWithString(string label, string fontName, float fontSize, Microsoft.Xna.Framework.Color fgColor, Microsoft.Xna.Framework.Color bgColor)
        {
            CCLabelTTF cCLabelTTF = new CCLabelTTF();

            if (cCLabelTTF.initWithString(label, fontName, fontSize, fgColor, bgColor))
            {
                return(cCLabelTTF);
            }
            return(null);
        }