Пример #1
0
        private void createComposedContents()
        {
            if (mImage != null)
            {
                mImage.removeFromParent(true);
                mImage = null;
            }
            if (mQuadBatch == null)
            {
                mQuadBatch = new AsQuadBatch();
                mQuadBatch.setTouchable(false);
                addChild(mQuadBatch);
            }
            else
            {
                mQuadBatch.reset();
            }
            AsBitmapFont bitmapFont = (AsBitmapFont)(getBitmapFonts()[mFontName]);

            if (bitmapFont == null)
            {
                throw new AsError("Bitmap font not registered: " + mFontName);
            }
            bitmapFont.fillQuadBatch(mQuadBatch, mHitArea.getWidth(), mHitArea.getHeight(), mText, mFontSize, mColor, mHAlign, mVAlign, mAutoScale, mKerning);
            mTextBounds = null;
        }
Пример #2
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont, String name)
 {
     if (name == null)
     {
         name = bitmapFont.getName();
     }
     getBitmapFonts()[name] = bitmapFont;
     return(name);
 }
Пример #3
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont)
 {
     return(registerBitmapFont(bitmapFont, null));
 }
Пример #4
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont)
 {
     return registerBitmapFont(bitmapFont, null);
 }
Пример #5
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont, String name)
 {
     if(name == null)
     {
         name = bitmapFont.getName();
     }
     getBitmapFonts()[name] = bitmapFont;
     return name;
 }