1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 04:49:40 +08:00

Merge branch 'master' into rework-selection-updates

This commit is contained in:
Dean Herbert 2019-09-28 20:02:21 +08:00 committed by GitHub
commit 11b5643b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 6 deletions

View File

@ -57,7 +57,7 @@ namespace osu.Game.Overlays
protected override void LoadComplete()
{
beatmap.BindValueChanged(beatmapChanged, true);
mods.BindValueChanged(_ => updateAudioAdjustments(), true);
mods.BindValueChanged(_ => ResetTrackAdjustments(), true);
base.LoadComplete();
}
@ -213,12 +213,12 @@ namespace osu.Game.Overlays
current = beatmap.NewValue;
TrackChanged?.Invoke(current, direction);
updateAudioAdjustments();
ResetTrackAdjustments();
queuedDirection = null;
}
private void updateAudioAdjustments()
public void ResetTrackAdjustments()
{
var track = current?.Track;
if (track == null)

View File

@ -13,6 +13,7 @@ using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Framework.MathUtils;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -45,7 +46,6 @@ namespace osu.Game.Screens.Play.HUD
{
text = new OsuSpriteText
{
Text = "hold for menu",
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft
@ -60,9 +60,23 @@ namespace osu.Game.Screens.Play.HUD
AutoSizeAxes = Axes.Both;
}
[Resolved]
private OsuConfigManager config { get; set; }
private Bindable<int> activationDelay;
protected override void LoadComplete()
{
activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
activationDelay.BindValueChanged(v =>
{
text.Text = v.NewValue > 0
? "hold for menu"
: "press for menu";
}, true);
text.FadeInFromZero(500, Easing.OutQuint).Delay(1500).FadeOut(500, Easing.OutQuint);
base.LoadComplete();
}

View File

@ -490,6 +490,7 @@ namespace osu.Game.Screens.Select
BeatmapDetails.Leaderboard.RefreshScores();
Beatmap.Value.Track.Looping = true;
music?.ResetTrackAdjustments();
if (Beatmap != null && !Beatmap.Value.BeatmapSetInfo.DeletePending)
{

View File

@ -21,7 +21,7 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Humanizer" Version="2.7.2" />
<PackageReference Include="Humanizer" Version="2.7.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />

View File

@ -113,7 +113,7 @@
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Humanizer" Version="2.7.2" />
<PackageReference Include="Humanizer" Version="2.7.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />