예제 #1
0
        public Settings_Popup(Game_State manager, ContentManager content, Input_Handler[] inputs, Rectangle bounds)
            : base(content, bounds)
        {
            // Make a white boundary smaller than the bounds.
            menuBounds = new Rectangle(bounds.Width / 20, bounds.Height / 20,
                bounds.Width - (bounds.Width / 20) * 2, bounds.Height - (bounds.Height / 20) * 2);
            //Debug.WriteLine(menuBounds.X + " " + menuBounds.Y + " " + menuBounds.Width + " " + menuBounds.Height);

            SoundEffect menuSound = content.Load<SoundEffect>("Sounds/MenuC");

            menu = new Settings_Menu(content.Load<SpriteFont>("Menu/menufont"), menuBounds, menuSound);

            this.manager = manager;
            manager.inputs[0].OnKeyRelease += HandleInput;
        }
예제 #2
0
        public Settings_Popup(Game_State manager, ContentManager content, Input_Handler[] inputs, Rectangle bounds)
            : base(content, bounds)
        {
            // Make a white boundary smaller than the bounds.
            menuBounds = new Rectangle(bounds.Width / 20, bounds.Height / 20,
                                       bounds.Width - (bounds.Width / 20) * 2, bounds.Height - (bounds.Height / 20) * 2);
            //Debug.WriteLine(menuBounds.X + " " + menuBounds.Y + " " + menuBounds.Width + " " + menuBounds.Height);

            SoundEffect menuSound = content.Load <SoundEffect>("Sounds/MenuC");

            menu = new Settings_Menu(content.Load <SpriteFont>("Menu/menufont"), menuBounds, menuSound);

            this.manager = manager;
            manager.inputs[0].OnKeyRelease += HandleInput;
        }