mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Remove BeatmapInfo field
This commit is contained in:
parent
1df50adc3a
commit
51c577624b
@ -151,8 +151,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.YahooIntegration, false).Disabled = true;
|
||||
Set(OsuConfig.ForceFrameFlush, false).Disabled = true;
|
||||
Set(OsuConfig.DetectPerformanceIssues, true).Disabled = true;
|
||||
Set(OsuConfig.MenuMusic, true).Disabled = true;
|
||||
Set(OsuConfig.MenuVoice, true).Disabled = true;
|
||||
Set(OsuConfig.RawInput, false).Disabled = true;
|
||||
Set(OsuConfig.AbsoluteToOsuWindow, Get<bool>(OsuConfig.RawInput)).Disabled = true;
|
||||
Set(OsuConfig.ShowMenuTips, true).Disabled = true;
|
||||
@ -181,7 +179,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true;
|
||||
Set(OsuConfig.ConfineMouse, Get<bool>(OsuConfig.ConfineMouseToFullscreen) ?
|
||||
ConfineMouseMode.Fullscreen : ConfineMouseMode.Never).Disabled = true;
|
||||
|
||||
|
||||
GetOriginalBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
|
||||
{
|
||||
if (Get<bool>(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true);
|
||||
|
@ -63,7 +63,6 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private Bindable<bool> menuMusic;
|
||||
private TrackManager trackManager;
|
||||
private BeatmapInfo beatmap;
|
||||
private WorkingBeatmap song;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -78,8 +77,7 @@ namespace osu.Game.Screens.Menu
|
||||
int choosableBeatmapsetAmmount = beatmaps.Query<BeatmapSetInfo>().Count();
|
||||
if (choosableBeatmapsetAmmount > 0)
|
||||
{
|
||||
beatmap = beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0];
|
||||
song = beatmaps.GetWorkingBeatmap(beatmap);
|
||||
song = beatmaps.GetWorkingBeatmap(beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0]);
|
||||
Beatmap = song;
|
||||
}
|
||||
}
|
||||
@ -110,8 +108,8 @@ namespace osu.Game.Screens.Menu
|
||||
Task.Run(() =>
|
||||
{
|
||||
trackManager.SetExclusive(song.Track);
|
||||
song.Track.Seek(beatmap.Metadata.PreviewTime);
|
||||
if (beatmap.Metadata.PreviewTime == -1)
|
||||
song.Track.Seek(song.Beatmap.Metadata.PreviewTime);
|
||||
if (song.Beatmap.Metadata.PreviewTime == -1)
|
||||
song.Track.Seek(song.Track.Length * .4f);
|
||||
song.Track.Start();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user