示例#1
0
 public OptionsMenu(StructOptionsMain structOptionsMain)
 {
     this.structOptionsMain = structOptionsMain;
     this.graphics = structOptionsMain.Graphics;
     this.Content = structOptionsMain.Content;
     this.ch = structOptionsMain.Ch;
 }
示例#2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            graphics.IsFullScreen = true;
            structOptionsMain = new StructOptionsMain();
            ch = new ControlHandler();

            structOptionsMain.Graphics = graphics;
            structOptionsMain.Content = Content;
            structOptionsMain.SpriteBatch = spriteBatch;
            structOptionsMain.SpriteFont = Content.Load<SpriteFont>("MenuFont");
            structOptionsMain.Ch = ch;
            oMenu = new OptionsMenu(structOptionsMain);
            graphics.PreferredBackBufferWidth = 1024;
            graphics.PreferredBackBufferHeight = 576;
            oMenu.Init();
        }