예제 #1
0
        /// <summary>
        /// Load initial game data and assets once.
        /// </summary>
        public override void LoadContent()
        {
            //TODO: Offload to initialize
            ScreenManager.Game.IsMouseVisible = true;
            spriteBatch = ScreenManager.SpriteBatch;
            content = new ContentManager(ScreenManager.Game.Services, "Content");
            //Load banner Image

            //Load Instruction text (also error text)
            textMessage = new TextBox(message,
                new Vector2(this.ScreenManager.GraphicsDevice.Viewport.Width/2, 290), Color.Black);
            textMessage.LoadContent(spriteBatch, ScreenManager.GraphicsDevice,
                content);
            //Load Input box
            inputBox = new InputBox(new Vector2(390, 390), Color.Orange, 10);
            inputBox.LoadContent(spriteBatch, ScreenManager.GraphicsDevice, content);
            //Load Login Button
            loginButton = new Button("Login", new Vector2(390, 500), Color.Aqua);
            loginButton.LoadContent(spriteBatch, ScreenManager.GraphicsDevice,
                content);
            exitButton = new Button("Exit", new Vector2(510, 500), Color.PaleVioletRed);
            exitButton.LoadContent(spriteBatch, ScreenManager.GraphicsDevice,
                content);
            //Load Exit Button
        }