mirror of
https://github.com/ppy/osu.git
synced 2026-05-20 13:20:21 +08:00
Merge branch 'master' into fix-carousel-thing
This commit is contained in:
@@ -561,7 +561,12 @@ namespace osu.Game.Graphics.Carousel
|
||||
}
|
||||
}
|
||||
|
||||
private enum TraversalType { Keyboard, Set, Group }
|
||||
private enum TraversalType
|
||||
{
|
||||
Keyboard,
|
||||
Set,
|
||||
Group
|
||||
}
|
||||
|
||||
private record TraversalOperation(TraversalType Type, int Direction);
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ namespace osu.Game.Screens.SelectV2
|
||||
public partial class SpreadDisplay : OsuAnimatedButton
|
||||
{
|
||||
public Bindable<BeatmapSetInfo?> BeatmapSet { get; } = new Bindable<BeatmapSetInfo?>();
|
||||
public Bindable<HashSet<BeatmapInfo>?> VisibleBeatmaps { get; } = new Bindable<HashSet<BeatmapInfo>?>();
|
||||
|
||||
public IBindable<HashSet<BeatmapInfo>?> VisibleBeatmaps { get; } = new Bindable<HashSet<BeatmapInfo>?>();
|
||||
|
||||
public BindableBool Expanded { get; } = new BindableBool();
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Expanded = { BindTarget = Expanded },
|
||||
VisibleBeatmaps = { BindTarget = VisibleBeatmaps },
|
||||
},
|
||||
},
|
||||
@@ -189,6 +188,8 @@ namespace osu.Game.Screens.SelectV2
|
||||
chevronIcon.ResizeWidthTo(0f, DURATION, Easing.OutQuint);
|
||||
chevronIcon.FadeTo(0f, DURATION, Easing.OutQuint);
|
||||
}
|
||||
|
||||
spreadDisplay.Expanded.Value = Expanded.Value;
|
||||
}
|
||||
|
||||
protected override void PrepareForUse()
|
||||
|
||||
@@ -52,6 +52,12 @@ namespace osu.Game.Screens.SelectV2
|
||||
AutoSizeAxes = Axes.X;
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
Content.CornerRadius = 5;
|
||||
|
||||
Action = () =>
|
||||
{
|
||||
if (Beatmap.Value != null)
|
||||
scopedBeatmapSet.Value = Beatmap.Value.BeatmapSet!;
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@@ -214,8 +220,6 @@ namespace osu.Game.Screens.SelectV2
|
||||
dot.Alpha = (1 + 4 * (float)(succeeding.Count - i) / succeeding.Count) / 5;
|
||||
}
|
||||
}
|
||||
|
||||
Action = () => scopedBeatmapSet.Value = Beatmap.Value.BeatmapSet!;
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
|
||||
@@ -193,7 +193,6 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Enabled = { BindTarget = Selected }
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -211,7 +210,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
ruleset.BindValueChanged(_ => updateKeyCount());
|
||||
mods.BindValueChanged(_ => updateKeyCount(), true);
|
||||
|
||||
Selected.BindValueChanged(s => Expanded.Value = s.NewValue, true);
|
||||
Selected.BindValueChanged(s =>
|
||||
{
|
||||
Expanded.Value = s.NewValue;
|
||||
spreadDisplay.Enabled.Value = s.NewValue;
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override void PrepareForUse()
|
||||
|
||||
Reference in New Issue
Block a user