1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Merge branch 'master' into taiko-editor

This commit is contained in:
Dean Herbert 2020-06-02 17:22:40 +09:00
commit b58c22c36e
3 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Bindables; using osu.Framework.Bindables;
@ -107,6 +108,9 @@ namespace osu.Game.Screens.Ranking
// Find the panel corresponding to the new score. // Find the panel corresponding to the new score.
expandedPanel = flow.SingleOrDefault(p => p.Score == score.NewValue); expandedPanel = flow.SingleOrDefault(p => p.Score == score.NewValue);
// handle horizontal scroll only when not hovering the expanded panel.
scroll.HandleScroll = () => expandedPanel?.IsHovered != true;
if (expandedPanel == null) if (expandedPanel == null)
return; return;
@ -166,6 +170,11 @@ namespace osu.Game.Screens.Ranking
/// </summary> /// </summary>
public float? InstantScrollTarget; public float? InstantScrollTarget;
/// <summary>
/// Whether this container should handle scroll trigger events.
/// </summary>
public Func<bool> HandleScroll;
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()
{ {
if (InstantScrollTarget != null) if (InstantScrollTarget != null)
@ -177,9 +186,9 @@ namespace osu.Game.Screens.Ranking
base.UpdateAfterChildren(); base.UpdateAfterChildren();
} }
public override bool HandlePositionalInput => false; public override bool HandlePositionalInput => HandleScroll();
public override bool HandleNonPositionalInput => false; public override bool HandleNonPositionalInput => HandleScroll();
} }
} }
} }

View File

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup Label="Package References"> <ItemGroup Label="Package References">
<PackageReference Include="Dapper" Version="2.0.35" /> <PackageReference Include="Dapper" Version="2.0.35" />
<PackageReference Include="DiffPlex" Version="1.6.2" /> <PackageReference Include="DiffPlex" Version="1.6.3" />
<PackageReference Include="Humanizer" Version="2.8.11" /> <PackageReference Include="Humanizer" Version="2.8.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />

View File

@ -75,7 +75,7 @@
</ItemGroup> </ItemGroup>
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. --> <!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
<ItemGroup Label="Transitive Dependencies"> <ItemGroup Label="Transitive Dependencies">
<PackageReference Include="DiffPlex" Version="1.6.2" /> <PackageReference Include="DiffPlex" Version="1.6.3" />
<PackageReference Include="Humanizer" Version="2.8.11" /> <PackageReference Include="Humanizer" Version="2.8.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />