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); }
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); }
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); }