MrGravity.LevelSelect.Load C# (CSharp) Method

Load() public method

Load the data that is needed to show the Level selection screen
public Load ( Microsoft.Xna.Framework.Content.ContentManager content, GraphicsDevice graphics ) : void
content Microsoft.Xna.Framework.Content.ContentManager Access to the content of the project
graphics GraphicsDevice Graphics that draws to the screen
return void
        public void Load(ContentManager content, GraphicsDevice graphics)
        {
            foreach (var level in _mLevelInfo.Elements())
                _mLevels.Add(new LevelChoice(level,_mControls, content, graphics));

            _mContent = content;
            Graphics = graphics;

            _mSelectBox = content.Load<Texture2D>("Images/Menu/LevelSelect/SelectBox");
            _mQuartz = content.Load<SpriteFont>("Fonts/QuartzSmaller");

            _mBackground = content.Load<Texture2D>("Images\\Menu\\backgroundSquares1");

            /*TODO - REMOVE THIS WHEN REAL ART COMES*/
            _mPrevious = new Texture2D[2];
            _mPrevious[0] = content.Load<Texture2D>("Images/Menu/LevelSelect/LeftArrow");
            _mPrevious[1] = content.Load<Texture2D>("Images/Menu/LevelSelect/LeftArrowSelect");

            _mNext = new Texture2D[2];
            _mNext[0] = content.Load<Texture2D>("Images/Menu/LevelSelect/RightArrow");
            _mNext[1] = content.Load<Texture2D>("Images/Menu/LevelSelect/RightArrowSelect");

            _mBack = new Texture2D[2];
            _mBack[0] = content.Load<Texture2D>("Images/Menu/LevelSelect/Back");
            _mBack[1] = content.Load<Texture2D>("Images/Menu/LevelSelect/BackSelect");

            _mStar = content.Load<Texture2D>("Images/NonHazards/Star"); ;

            _mLocked = content.Load<Texture2D>("Images/Lock/locked1a");

            _mPageCount = _mLevels.Count / 12 +1;

            _mScreenRect = graphics.Viewport.TitleSafeArea;
        }