-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into daily-challenge-intro-audio-auto-download
- Loading branch information
Showing
19 changed files
with
229 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
osu file format v128 | ||
|
||
[HitObjects] | ||
// Coordinates should be preserves in lazer beatmaps. | ||
|
||
256.99853,256.001,1000,49,0,0:0:0:0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
osu file format v14 | ||
|
||
[HitObjects] | ||
// Coordinates should be truncated to int values in legacy beatmaps. | ||
256.99853,256.001,1000,49,0,0:0:0:0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.Audio; | ||
using osu.Framework.Bindables; | ||
using osu.Framework.Graphics; | ||
using osuTK.Graphics; | ||
|
||
namespace osu.Game.Overlays.Volume | ||
{ | ||
public partial class MasterVolumeMeter : VolumeMeter | ||
{ | ||
private MuteButton muteButton = null!; | ||
|
||
public Bindable<bool> IsMuted { get; } = new Bindable<bool>(); | ||
|
||
private readonly BindableDouble muteAdjustment = new BindableDouble(); | ||
|
||
[Resolved] | ||
private VolumeOverlay volumeOverlay { get; set; } = null!; | ||
|
||
public MasterVolumeMeter(string name, float circleSize, Color4 meterColour) | ||
: base(name, circleSize, meterColour) | ||
{ | ||
} | ||
|
||
[BackgroundDependencyLoader] | ||
private void load(AudioManager audio) | ||
{ | ||
IsMuted.BindValueChanged(muted => | ||
{ | ||
if (muted.NewValue) | ||
audio.AddAdjustment(AdjustableProperty.Volume, muteAdjustment); | ||
else | ||
audio.RemoveAdjustment(AdjustableProperty.Volume, muteAdjustment); | ||
}); | ||
|
||
Add(muteButton = new MuteButton | ||
{ | ||
Anchor = Anchor.CentreLeft, | ||
Origin = Anchor.Centre, | ||
Blending = BlendingParameters.Additive, | ||
X = CircleSize / 2, | ||
Y = CircleSize * 0.23f, | ||
Current = { BindTarget = IsMuted } | ||
}); | ||
|
||
muteButton.Current.ValueChanged += _ => volumeOverlay.Show(); | ||
} | ||
|
||
public void ToggleMute() => muteButton.Current.Value = !muteButton.Current.Value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.