Exemplo n.º 1
0
        protected override void Draw(GameTime time)
        {
            GraphicsDevice.Clear(Color.White);

            // this actually works fine

            /*
             * //sp.Begin();
             * //sp.Draw(tex, new Rectangle(0, 0, 128, 128), Color.Blue);
             * //sp.End();
             */

            // this doesn't (the actual test case)
            UI.Reset();
            UI.Draw2D(tex, new Vector3(0, 0, 0), new Vector3(128, 128, 128));
            UI.FlushSprites(false);
        }
Exemplo n.º 2
0
 public void Draw(double frameMS)
 {
     OrderControlsBasedOnUILayerMetaData();
     m_SpriteBatch.GraphicsDevice.Clear(Color.Transparent);
     m_SpriteBatch.Reset();
     foreach (AControl c in OpenControls.Reverse <AControl>())
     {
         if (c.IsInitialized)
         {
             c.Draw(m_SpriteBatch, c.Position, frameMS);
         }
     }
     if (Cursor != null)
     {
         Cursor.Draw(m_SpriteBatch, m_Input.MousePosition);
     }
     m_SpriteBatch.FlushSprites(false);
 }