mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Update in-line with framework IsActive changes
This commit is contained in:
@ -120,6 +120,8 @@ namespace osu.Game
|
||||
forwardLoggedErrorsToNotifications();
|
||||
|
||||
RavenLogger = new RavenLogger(this);
|
||||
|
||||
IsActive.BindValueChanged(updateActiveState);
|
||||
}
|
||||
|
||||
public void ToggleSettings() => settings.ToggleVisibility();
|
||||
@ -674,16 +676,12 @@ namespace osu.Game
|
||||
|
||||
private readonly BindableDouble inactiveVolumeAdjust = new BindableDouble();
|
||||
|
||||
protected override void OnDeactivated()
|
||||
private void updateActiveState(bool isActive)
|
||||
{
|
||||
base.OnDeactivated();
|
||||
Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
||||
}
|
||||
|
||||
protected override void OnActivated()
|
||||
{
|
||||
base.OnActivated();
|
||||
Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
||||
if (isActive)
|
||||
Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
||||
else
|
||||
Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
||||
}
|
||||
|
||||
public bool OnReleased(GlobalAction action) => false;
|
||||
|
Reference in New Issue
Block a user