コード例 #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            basicUI.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            debug.Draw();
            base.Draw(gameTime);
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: jiailiuyan/UI_Examples
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.SetRenderTarget(renderTarget);
            Color color = new Color();

            color.A = 255;
            color.R = (byte)random.Next(0, 255);
            color.G = (byte)random.Next(0, 255);
            color.B = (byte)random.Next(0, 255);
            GraphicsDevice.Clear(color);
            GraphicsDevice.SetRenderTarget(null);

            GraphicsDevice.Clear(Color.CornflowerBlue);

            basicUI.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            debug.Draw();
            base.Draw(gameTime);
        }
コード例 #3
0
 private void Render(RenderDrawContext arg1, RenderFrame arg2)
 {
     uiRoot.Draw(Game.UpdateTime.Elapsed.TotalMilliseconds);
     debug.Draw();
 }
コード例 #4
0
 private void RenderUI()
 {
     root.Draw(elapsedGameTime);
     debug.Draw();
 }