//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {License Information: Creative Commons} //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace Presentation { #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using RobLoach; #endregion // In-game Screen public class GameScreen { // Attributes: protected GameMenu menu; // Menu object protected Texture2D backgroundTexture; // The background texture // Constructor public GameScreen() { } // Set the background texture public void SetBackground(Texture2D backgroundTexture) { this.backgroundTexture = backgroundTexture; } // Draw our game screen public void Draw(SpriteBatch spriteBatch) { spriteBatch.Begin(); // First draw the background texture if it is not null if (backgroundTexture != null) { spriteBatch.Draw(backgroundTexture, new Rectangle(0, 0, MainGame.GAME_WINDOW_WIDTH, MainGame.GAME_WINDOW_HEIGHT), Color.White); } spriteBatch.End(); //now draw the menu elements menu.Draw(spriteBatch); } // Returns the menu public GameMenu GetMenu() { return menu; } } }