1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Merge branch 'master' into fix-mod-select-cross-talk

This commit is contained in:
Bartłomiej Dach 2021-07-08 19:53:50 +02:00 committed by GitHub
commit 3e21eeb7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -11,7 +11,7 @@
A free-to-win rhythm game. Rhythm is just a *click* away!
The future of [osu!](https://osu.ppy.sh) and the beginning of an open era! Commonly known by the codename *osu!lazer*. Pew pew.
The future of [osu!](https://osu.ppy.sh) and the beginning of an open era! Currently known by and released under the codename "*lazer*". As in sharper than cutting-edge.
## Status
@ -23,7 +23,7 @@ We are accepting bug reports (please report with as much detail as possible and
- Detailed release changelogs are available on the [official osu! site](https://osu.ppy.sh/home/changelog/lazer).
- You can learn more about our approach to [project management](https://github.com/ppy/osu/wiki/Project-management).
- Read peppy's [latest blog post](https://blog.ppy.sh/a-definitive-lazer-faq/) exploring where lazer is currently and the roadmap going forward.
- Read peppy's [latest blog post](https://blog.ppy.sh/a-definitive-lazer-faq/) exploring where the project is currently and the roadmap going forward.
## Running osu!

View File

@ -8,6 +8,7 @@ using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -42,7 +43,8 @@ namespace osu.Game.Overlays.Volume
private Container selectedGlowContainer;
private Sample sample;
private Sample hoverSample;
private Sample notchSample;
private double sampleLastPlaybackTime;
public event Action<SelectionState> StateChanged;
@ -78,7 +80,8 @@ namespace osu.Game.Overlays.Volume
[BackgroundDependencyLoader]
private void load(OsuColour colours, AudioManager audio)
{
sample = audio.Samples.Get(@"UI/notch-tick");
hoverSample = audio.Samples.Get($"UI/{HoverSampleSet.Button.GetDescription()}-hover");
notchSample = audio.Samples.Get(@"UI/notch-tick");
sampleLastPlaybackTime = Time.Current;
Color4 backgroundColour = colours.Gray1;
@ -274,7 +277,7 @@ namespace osu.Game.Overlays.Volume
if (Time.Current - sampleLastPlaybackTime <= tick_debounce_time)
return;
var channel = sample.GetChannel();
var channel = notchSample.GetChannel();
channel.Frequency.Value = 0.99f + RNG.NextDouble(0.02f) + displayVolume * 0.1f;
@ -388,6 +391,7 @@ namespace osu.Game.Overlays.Volume
case SelectionState.Selected:
this.ScaleTo(1.04f, transition_length, Easing.OutExpo);
selectedGlowContainer.FadeIn(transition_length, Easing.OutExpo);
hoverSample?.Play();
break;
case SelectionState.NotSelected: