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); }
/// <summary> /// This method renders the current state of the element to the screen. /// </summary> /// <param name="spriteBatch">A SpriteBatch that has begun.</param> public override void Draw(SpriteBatch spriteBatch) { if (_collection.Count != 0) { for (int i = _pageBeginning; i < _pageEnding; ++i) { _collection[i].Draw(spriteBatch); } } _scrollable.Draw(spriteBatch); }