Exemple #1
0
        public override void Draw(GameTime gameTime)
        {
            if (_isInitialized)
            {
                SpriteBatch spriteBatch = SharedSpriteBatch;
                spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);

                spriteBatch.Draw(
                    _blankTexture,
                    _viewableArea,
                    Color.WhiteSmoke * 0.5f
                    );

                spriteBatch.End();

                spriteBatch.Begin();

                spriteBatch.Draw(
                    _inputBoxTexture,
                    _inputBoxDestination,
                    Color.White
                    );

                foreach (GuiDrawable guiDrawable in _guiDrawable)
                {
                    guiDrawable.Draw(spriteBatch);
                }

                _scrollable.Draw(spriteBatch);
                spriteBatch.End();

                _colorStream.Draw(gameTime);
            }
            base.Draw(gameTime);
        }
Exemple #2
0
 public void Render(GameTime gameTime)
 {
     if (ColorStream != null)
     {
         ColorStream.Draw(gameTime);
     }
     if (DepthStream != null)
     {
         DepthStream.Draw(gameTime);
     }
 }
Exemple #3
0
        /// <summary>
        /// This method renders the current state of the ExerciseScreen.
        /// </summary>
        /// <param name="gameTime">The elapsed game time.</param>
        public override void Draw(GameTime gameTime)
        {
            if (_isInitialized)
            {
                GraphicsDevice.Clear(Color.WhiteSmoke);
                _colorStream.Draw(gameTime);

                SpriteBatch spriteBatch = SharedSpriteBatch;
                spriteBatch.Begin();

                foreach (GuiDrawable guiDrawable in _guiDrawable)
                {
                    guiDrawable.Draw(spriteBatch);
                }

                foreach (ExerciseTile exerciseTile in _exerciseTiles)
                {
                    if (exerciseTile.IsCurrentTile)
                    {
                        exerciseTile.Draw(spriteBatch);
                    }
                }

                if (!string.IsNullOrEmpty(_repetitionString))
                {
                    spriteBatch.DrawString(
                        _spriteFont,
                        _repetitionString,
                        _tileTextPosition,
                        Color.Black
                        );
                }

                if (_countTexture != null)
                {
                    spriteBatch.Draw(
                        _countTexture,
                        _colorStreamPosition,
                        Color.White
                        );
                }
                spriteBatch.End();
            }

            base.Draw(gameTime);
        }
Exemple #4
0
        /// <summary>
        /// This method renders the current state of the SummaryScreen to the screen.
        /// </summary>
        /// <param name="gameTime">The elapsed game time.</param>
        public override void Draw(GameTime gameTime)
        {
            if (_isInitialized)
            {
                GraphicsDevice.Clear(Color.WhiteSmoke);
                SpriteBatch spriteBatch = SharedSpriteBatch;
                spriteBatch.Begin();

                /** Draw only the items pertinent to a running replay */
                if (_isReplaying)
                {
                    foreach (GuiDrawable guiDrawable in _guiDrawableReplay)
                    {
                        guiDrawable.Draw(spriteBatch);
                    }

                    foreach (GuiDrawable guiDrawable in _guiDrawable)
                    {
                        if (guiDrawable.Text != "Catalog")
                        {
                            guiDrawable.Draw(spriteBatch);
                        }
                    }
                }
                /** Draw only the items pertinent to a selecting replay */
                else
                {
                    foreach (GuiDrawable guiDrawable in _guiDrawableSelect)
                    {
                        guiDrawable.Draw(spriteBatch);
                    }

                    foreach (GuiDrawable guiDrawable in _guiDrawable)
                    {
                        guiDrawable.Draw(spriteBatch);
                    }
                }

                spriteBatch.End();

                _colorStream.Draw(gameTime);
            }

            base.Draw(gameTime);
        }