mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into mod-overlay
This commit is contained in:
@ -57,34 +57,12 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private Footer footer;
|
||||
|
||||
Player player;
|
||||
OsuScreen player;
|
||||
|
||||
FilterControl filter;
|
||||
|
||||
private void start()
|
||||
{
|
||||
if (player != null || Beatmap == null)
|
||||
return;
|
||||
|
||||
//in the future we may want to move this logic to a PlayerLoader gamemode or similar, so we can rely on the SongSelect transition
|
||||
//and provide a better loading experience (at the moment song select is still accepting input during preload).
|
||||
player = new Player
|
||||
{
|
||||
BeatmapInfo = carousel.SelectedGroup.SelectedPanel.Beatmap,
|
||||
PreferredPlayMode = playMode.Value
|
||||
};
|
||||
|
||||
player.Preload(Game, delegate
|
||||
{
|
||||
if (!Push(player))
|
||||
{
|
||||
player = null;
|
||||
//error occured?
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game,
|
||||
private void load(BeatmapDatabase beatmaps, AudioManager audio, Framework.Game game,
|
||||
OsuGame osuGame, OsuColour colours)
|
||||
{
|
||||
const float carousel_width = 640;
|
||||
@ -145,10 +123,20 @@ namespace osu.Game.Screens.Select
|
||||
Bottom = 50,
|
||||
},
|
||||
},
|
||||
footer = new Footer()
|
||||
footer = new Footer
|
||||
{
|
||||
OnBack = Exit,
|
||||
OnStart = start,
|
||||
OnStart = () =>
|
||||
{
|
||||
if (player != null || Beatmap == null)
|
||||
return;
|
||||
|
||||
(player = new PlayerLoader(new Player
|
||||
{
|
||||
BeatmapInfo = carousel.SelectedGroup.SelectedPanel.Beatmap,
|
||||
PreferredPlayMode = playMode.Value
|
||||
})).Preload(Game, l => Push(player));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -295,6 +283,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
backgroundModeBeatmap.Beatmap = beatmap;
|
||||
backgroundModeBeatmap.BlurTo(background_blur, 1000);
|
||||
backgroundModeBeatmap.FadeTo(1, 250);
|
||||
}
|
||||
|
||||
if (beatmap != null)
|
||||
@ -347,7 +336,7 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game, bool select = false)
|
||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet, Framework.Game game, bool select = false)
|
||||
{
|
||||
beatmapSet = database.GetWithChildren<BeatmapSetInfo>(beatmapSet.ID);
|
||||
beatmapSet.Beatmaps.ForEach(b =>
|
||||
@ -365,7 +354,7 @@ namespace osu.Game.Screens.Select
|
||||
var group = new BeatmapGroup(beatmap)
|
||||
{
|
||||
SelectionChanged = selectionChanged,
|
||||
StartRequested = b => start()
|
||||
StartRequested = b => footer.StartButton.TriggerClick()
|
||||
};
|
||||
|
||||
//for the time being, let's completely load the difficulty panels in the background.
|
||||
@ -387,7 +376,7 @@ namespace osu.Game.Screens.Select
|
||||
}));
|
||||
}
|
||||
|
||||
private void addBeatmapSets(BaseGame game, CancellationToken token)
|
||||
private void addBeatmapSets(Framework.Game game, CancellationToken token)
|
||||
{
|
||||
foreach (var beatmapSet in database.Query<BeatmapSetInfo>())
|
||||
{
|
||||
@ -401,7 +390,7 @@ namespace osu.Game.Screens.Select
|
||||
switch (args.Key)
|
||||
{
|
||||
case Key.Enter:
|
||||
start();
|
||||
footer.StartButton.TriggerClick();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user