public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float xStart, float yStart) { FontMan pMan = FontMan.PrivGetInstance(); Font pNode = (Font)pMan.BaseAdd(); Debug.Assert(pNode != null); pNode.Set(name, pMessage, glyphName, xStart, yStart); // Add to sprite batch SpriteBatch pSB = SpriteBatchMan.Find(SB_Name); Debug.Assert(pSB != null); Debug.Assert(pNode.pFontSprite != null); pSB.Attach(pNode.pFontSprite); return(pNode); }
public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float x, float y) { FontMan pFMan = FontMan.PrivGetInstance(); Debug.Assert(pFMan != null); Font pFNode = (Font)pFMan.BaseAdd(); Debug.Assert(pFNode != null); pFNode.Set(name, pMessage, glyphName, x, y); SpriteBatch pSpriteBatch = SpriteBatchMan.Find(SB_Name); Debug.Assert(pSpriteBatch != null); Debug.Assert(pFNode.pFontSprite != null); pSpriteBatch.Attach(pFNode.pFontSprite); return(pFNode); }