mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Fix selection not occurring when switching from empty ruleset on first load
This commit is contained in:
@ -751,13 +751,17 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public CarouselRoot(BeatmapCarousel carousel)
|
||||
{
|
||||
// root should always remaing selected. if not, PerformSelection will not be called.
|
||||
State.Value = CarouselItemState.Selected;
|
||||
State.ValueChanged += state => State.Value = CarouselItemState.Selected;
|
||||
|
||||
this.carousel = carousel;
|
||||
}
|
||||
|
||||
protected override void PerformSelection()
|
||||
{
|
||||
if (LastSelected == null)
|
||||
carousel.SelectNextRandom();
|
||||
carousel?.SelectNextRandom();
|
||||
else
|
||||
base.PerformSelection();
|
||||
}
|
||||
|
@ -150,6 +150,7 @@ namespace osu.Game.Screens.Select
|
||||
},
|
||||
Child = Carousel = new BeatmapCarousel
|
||||
{
|
||||
AllowSelection = false, // delay any selection until our bindables are ready to make a good choice.
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -655,6 +656,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
bindBindables();
|
||||
|
||||
Carousel.AllowSelection = true;
|
||||
|
||||
// If a selection was already obtained, do not attempt to update the selected beatmap.
|
||||
if (Carousel.SelectedBeatmapSet != null)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user