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; } }
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 }
public void SetSoundVolume(float volume) { CurrentConfig.SoundVolume = ArgTo0to1(volume); AmbientSounds.UpdateVolumes(); SaveConfig(); }