Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont, String name)
 {
     if (name == null)
     {
         name = bitmapFont.getName();
     }
     getBitmapFonts()[name] = bitmapFont;
     return(name);
 }
Exemplo n.º 3
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont)
 {
     return(registerBitmapFont(bitmapFont, null));
 }
Exemplo n.º 4
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont)
 {
     return registerBitmapFont(bitmapFont, null);
 }
Exemplo n.º 5
0
 public static String registerBitmapFont(AsBitmapFont bitmapFont, String name)
 {
     if(name == null)
     {
         name = bitmapFont.getName();
     }
     getBitmapFonts()[name] = bitmapFont;
     return name;
 }