Ejemplo n.º 1
0
        public void ApplyConfig(bool Activate = true)
        {
            if (CurrentConfig.Fullscreen)
            {
                ApplyConfigToForm();

                graphics.IsFullScreen = true;
                graphics.ApplyChanges();
            }
            else
            {
                ApplyConfigToForm();

                graphics.IsFullScreen              = false;
                graphics.PreferredBackBufferWidth  = CurrentConfig.Width;
                graphics.PreferredBackBufferHeight = CurrentConfig.Height;
                graphics.ApplyChanges();
            }

            AmbientSounds.UpdateVolumes();

            if (Activate)
            {
                NeedsApplication = true;
            }
        }
Ejemplo n.º 2
0
            public Config()
            {
#if DEBUG
                Fullscreen = false;
                Width      = 1280;
                Height     = 720;

                MusicVolume = 0;
                SoundVolume = .5f;
#else
                Fullscreen = false;
                Width      = 1280;
                Height     = 720;

                //Fullscreen = true;
                //Width = GraphicsManager.GraphicsDevice.Adapter.CurrentDisplayMode.Width;
                //Height = GraphicsManager.GraphicsDevice.Adapter.CurrentDisplayMode.Height;

                MusicVolume = 1;
                SoundVolume = 1;
                AmbientSounds.UpdateVolumes();
#endif
            }
Ejemplo n.º 3
0
 public void SetSoundVolume(float volume)
 {
     CurrentConfig.SoundVolume = ArgTo0to1(volume);
     AmbientSounds.UpdateVolumes();
     SaveConfig();
 }