Exemplo n.º 1
0
        public static Font Add(FontName fontName, int key, TextureName texName, float x, float y, float w, float h)
        {
            FontManager fontMan = FontManager.GetInstance();
            Font        font    = (Font)fontMan.BaseAdd();

            Debug.Assert(font != null);
            font.Set(fontName, key, texName, x, y, w, h);
            return(font);
        }
Exemplo n.º 2
0
        public static Font Add(Font.Name name, SpriteBatch pSpriteBatch, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            FontManager pInstance = FontManager.PrivGetInstance();

            Font pNode = (Font)pInstance.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(name, pMessage, glyphName, xStart, yStart);

            // Add to sprite batch
            Debug.Assert(pSpriteBatch != null);
            Debug.Assert(pNode.pFontSprite != null);
            pSpriteBatch.Attach(pNode.pFontSprite);

            return(pNode);
        }
Exemplo n.º 3
0
        public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, float xStart, float yStart, float width, float height)
        {
            FontManager pMan = FontManager.pActiveMan;

            Font pNode = (Font)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(name, pMessage, xStart, yStart, width, height);

            // Add to sprite batch
            SpriteBatch pSB = SpriteBatchManager.Find(SB_Name);

            Debug.Assert(pSB != null);
            Debug.Assert(pNode.pFontSprite != null);
            pSB.Attach(pNode.pFontSprite);

            return(pNode);
        }