// Keep track of changes made to the audio settings private void OnSettingsApplied(object sender, SettingsAppliedEventArgs e) { if (!e.AudioChanged) { return; } _enabled = _settings.Settings.Audio.Enabled; _volume = _settings.Settings.Audio.Volume / 100F; _sfxSet = _settings.Settings.Audio.SfxSet; }
private void SettingsManagerOnSettingsApplied(object sender, SettingsAppliedEventArgs e) { // Update the bounds and scale when video settings are altered if (e.VideoChanged) { Vector2 resolution = _settingsManager.Settings.Video.Resolution; float boundsWidth = (resolution.X / resolution.Y) * _gameInfo.Bounds.Height; _gameInfo.Bounds = new RectangleF(0F, 0F, boundsWidth, _gameInfo.Bounds.Height); _gameInfo.Scale = resolution.Y / _gameInfo.Bounds.Height; } }