mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
No longer holds OsuGame reference.
This commit is contained in:
parent
9b76110605
commit
3858c77817
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
@ -15,7 +14,6 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.IO;
|
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
@ -28,7 +26,6 @@ namespace osu.Game.Overlays
|
|||||||
private TextAwesome playButton, listButton;
|
private TextAwesome playButton, listButton;
|
||||||
private SpriteText title, artist;
|
private SpriteText title, artist;
|
||||||
|
|
||||||
private OsuGameBase osuGame;
|
|
||||||
private TrackManager trackManager;
|
private TrackManager trackManager;
|
||||||
private List<BeatmapSetInfo> playList;
|
private List<BeatmapSetInfo> playList;
|
||||||
private BeatmapDatabase database;
|
private BeatmapDatabase database;
|
||||||
@ -43,13 +40,17 @@ namespace osu.Game.Overlays
|
|||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
{
|
{
|
||||||
base.Load(game);
|
base.Load(game);
|
||||||
osuGame = game as OsuGameBase;
|
var osuGame = game as OsuGameBase;
|
||||||
|
|
||||||
beatmapSource = osuGame.Beatmap ?? new Bindable<WorkingBeatmap>();
|
if (osuGame != null)
|
||||||
|
{
|
||||||
|
if (database == null) database = osuGame.Beatmaps;
|
||||||
|
trackManager = osuGame.Audio.Track;
|
||||||
|
}
|
||||||
|
|
||||||
|
beatmapSource = osuGame?.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||||
beatmapSource.ValueChanged += workingChanged;
|
beatmapSource.ValueChanged += workingChanged;
|
||||||
workingChanged();
|
workingChanged();
|
||||||
if (database == null) database = osuGame.Beatmaps;
|
|
||||||
trackManager = osuGame.Audio.Track;
|
|
||||||
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
||||||
|
|
||||||
Width = 400;
|
Width = 400;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user