Пример #1
0
        //SetData here;
        public void Set(FontNode.Name name, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            Debug.Assert(pMessage != null);

            this.name = name;
            this.pFontSprite.Set(name, pMessage, glyphName, xStart, yStart);
        }
Пример #2
0
        public static FontNode Find(FontNode.Name name)
        {
            //get the singleton
            FontManager pMan = privGetInstance();

            // Compare functions only compares two Nodes
            pMan.pRefNode.SetName(name);

            FontNode pData = (FontNode)pMan.baseFindNode(pMan.pRefNode);

            return(pData);
        }
Пример #3
0
        public void Set(FontNode.Name name, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            Debug.Assert(pMessage != null);
            this.pMessage = pMessage;

            this.x = xStart;
            this.y = yStart;

            this.name      = name;
            this.glyphName = glyphName;

            // Force color to white
            Debug.Assert(this.pColor != null);
            this.pColor.Set(1.0f, 1.0f, 1.0f);
        }
Пример #4
0
        //----------------------------------------------------------------------
        // 4 Wrapper methods: baseAdd, baseFind, baseRemove, baseDump
        //----------------------------------------------------------------------

        public static FontNode Add(FontNode.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            FontManager pMan = FontManager.privGetInstance();

            FontNode pNode = (FontNode)pMan.baseAddToFront();

            Debug.Assert(pNode != null);

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

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