Beispiel #1
0
 public virtual void Draw(GameTime gameTime, GraphicsDevice graphicsDevice, GameSettings gameSettings, SpriteBatch spriteBatch)
 {
     if (Scrollable)
     {
         foreach (ButtonArea button in _buttonAreaList)
         {
             if (button.Position.Y + button.GetSize().Y + ScrollCurrentOffset.Y < _scrollDownButtonArea.Position.Y && button.Position.Y + ScrollCurrentOffset.Y > _scrollUpButtonArea.Position.Y + _scrollUpButtonArea.GetSize().Y)
             {
                 button.Draw(gameTime, graphicsDevice, gameSettings, spriteBatch, ScrollCurrentOffset);
             }
         }
         _scrollUpButtonArea.Draw(gameTime, graphicsDevice, gameSettings, spriteBatch, new Vector2(0, 0));
         _scrollDownButtonArea.Draw(gameTime, graphicsDevice, gameSettings, spriteBatch, new Vector2(0, 0));
     }
     else
     {
         foreach (ButtonArea button in _buttonAreaList)
         {
             button.Draw(gameTime, graphicsDevice, gameSettings, spriteBatch, ScrollCurrentOffset);
         }
     }
 }