mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:33:20 +08:00
Rename GameBeatmap -> BindableBeatmap
This commit is contained in:
parent
4086ff7313
commit
72cc53aded
@ -96,7 +96,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config, IGameBeatmap beatmap)
|
private void load(OsuConfigManager config, IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Child = cursorContainer = new SkinnableDrawable("cursor", _ => new CircularContainer
|
Child = cursorContainer = new SkinnableDrawable("cursor", _ => new CircularContainer
|
||||||
{
|
{
|
||||||
|
@ -12,14 +12,14 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="Bindable{WorkingBeatmap}"/> for the <see cref="OsuGame"/> beatmap.
|
/// A <see cref="Bindable{WorkingBeatmap}"/> for the <see cref="OsuGame"/> beatmap.
|
||||||
/// This should be used sparingly in-favour of <see cref="IGameBeatmap"/>.
|
/// This should be used sparingly in-favour of <see cref="IBindableBeatmap"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class GameBeatmap : NonNullableBindable<WorkingBeatmap>, IGameBeatmap
|
public abstract class BindableBeatmap : NonNullableBindable<WorkingBeatmap>, IBindableBeatmap
|
||||||
{
|
{
|
||||||
private AudioManager audioManager;
|
private AudioManager audioManager;
|
||||||
private WorkingBeatmap lastBeatmap;
|
private WorkingBeatmap lastBeatmap;
|
||||||
|
|
||||||
protected GameBeatmap(WorkingBeatmap defaultValue)
|
protected BindableBeatmap(WorkingBeatmap defaultValue)
|
||||||
: base(defaultValue)
|
: base(defaultValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -63,13 +63,13 @@ namespace osu.Game.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NotNull]
|
[NotNull]
|
||||||
IGameBeatmap IGameBeatmap.GetBoundCopy() => GetBoundCopy();
|
IBindableBeatmap IBindableBeatmap.GetBoundCopy() => GetBoundCopy();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a new <see cref="GameBeatmap"/> instance weakly bound to this <see cref="GameBeatmap"/>.
|
/// Retrieve a new <see cref="BindableBeatmap"/> instance weakly bound to this <see cref="BindableBeatmap"/>.
|
||||||
/// If you are further binding to events of the retrieved <see cref="GameBeatmap"/>, ensure a local reference is held.
|
/// If you are further binding to events of the retrieved <see cref="BindableBeatmap"/>, ensure a local reference is held.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[NotNull]
|
[NotNull]
|
||||||
public abstract GameBeatmap GetBoundCopy();
|
public abstract BindableBeatmap GetBoundCopy();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,12 +8,12 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read-only interface for the <see cref="OsuGame"/> beatmap.
|
/// Read-only interface for the <see cref="OsuGame"/> beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IGameBeatmap : IBindable<WorkingBeatmap>
|
public interface IBindableBeatmap : IBindable<WorkingBeatmap>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a new <see cref="IGameBeatmap"/> instance weakly bound to this <see cref="IGameBeatmap"/>.
|
/// Retrieve a new <see cref="IBindableBeatmap"/> instance weakly bound to this <see cref="IBindableBeatmap"/>.
|
||||||
/// If you are further binding to events of the retrieved <see cref="IGameBeatmap"/>, ensure a local reference is held.
|
/// If you are further binding to events of the retrieved <see cref="IBindableBeatmap"/>, ensure a local reference is held.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IGameBeatmap GetBoundCopy();
|
IBindableBeatmap GetBoundCopy();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -74,7 +74,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap)
|
private void load(IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
private OsuGameBeatmap beatmap;
|
private OsuBindableBeatmap beatmap;
|
||||||
protected GameBeatmap Beatmap => beatmap;
|
protected BindableBeatmap Beatmap => beatmap;
|
||||||
|
|
||||||
private Bindable<bool> fpsDisplayVisible;
|
private Bindable<bool> fpsDisplayVisible;
|
||||||
|
|
||||||
@ -157,15 +157,15 @@ namespace osu.Game
|
|||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Venera-Light"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Venera-Light"));
|
||||||
|
|
||||||
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
||||||
beatmap = new OsuGameBeatmap(defaultBeatmap, Audio);
|
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
|
||||||
BeatmapManager.DefaultBeatmap = defaultBeatmap;
|
BeatmapManager.DefaultBeatmap = defaultBeatmap;
|
||||||
|
|
||||||
// tracks play so loud our samples can't keep up.
|
// tracks play so loud our samples can't keep up.
|
||||||
// this adds a global reduction of track volume for the time being.
|
// this adds a global reduction of track volume for the time being.
|
||||||
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
||||||
|
|
||||||
dependencies.CacheAs<GameBeatmap>(beatmap);
|
dependencies.CacheAs<BindableBeatmap>(beatmap);
|
||||||
dependencies.CacheAs<IGameBeatmap>(beatmap);
|
dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
||||||
|
|
||||||
FileStore.Cleanup();
|
FileStore.Cleanup();
|
||||||
|
|
||||||
@ -237,22 +237,22 @@ namespace osu.Game
|
|||||||
|
|
||||||
public string[] HandledExtensions => fileImporters.SelectMany(i => i.HandledExtensions).ToArray();
|
public string[] HandledExtensions => fileImporters.SelectMany(i => i.HandledExtensions).ToArray();
|
||||||
|
|
||||||
private class OsuGameBeatmap : GameBeatmap
|
private class OsuBindableBeatmap : BindableBeatmap
|
||||||
{
|
{
|
||||||
public OsuGameBeatmap(WorkingBeatmap defaultValue, AudioManager audioManager)
|
public OsuBindableBeatmap(WorkingBeatmap defaultValue, AudioManager audioManager)
|
||||||
: this(defaultValue)
|
: this(defaultValue)
|
||||||
{
|
{
|
||||||
RegisterAudioManager(audioManager);
|
RegisterAudioManager(audioManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
private OsuGameBeatmap(WorkingBeatmap defaultValue)
|
private OsuBindableBeatmap(WorkingBeatmap defaultValue)
|
||||||
: base(defaultValue)
|
: base(defaultValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override GameBeatmap GetBoundCopy()
|
public override BindableBeatmap GetBoundCopy()
|
||||||
{
|
{
|
||||||
var copy = new OsuGameBeatmap(Default);
|
var copy = new OsuBindableBeatmap(Default);
|
||||||
copy.BindTo(this);
|
copy.BindTo(this);
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Overlays.Music
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BeatmapManager beatmaps, IGameBeatmap beatmap)
|
private void load(BeatmapManager beatmaps, IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
beatmaps.GetAllUsableBeatmapSets().ForEach(addBeatmapSet);
|
beatmaps.GetAllUsableBeatmapSets().ForEach(addBeatmapSet);
|
||||||
beatmaps.ItemAdded += addBeatmapSet;
|
beatmaps.ItemAdded += addBeatmapSet;
|
||||||
|
@ -26,14 +26,14 @@ namespace osu.Game.Overlays.Music
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Action<BeatmapSetInfo, int> OrderChanged;
|
public Action<BeatmapSetInfo, int> OrderChanged;
|
||||||
|
|
||||||
private GameBeatmap beatmap;
|
private BindableBeatmap beatmap;
|
||||||
private BeatmapManager beatmaps;
|
private BeatmapManager beatmaps;
|
||||||
|
|
||||||
private FilterControl filter;
|
private FilterControl filter;
|
||||||
private PlaylistList list;
|
private PlaylistList list;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, GameBeatmap beatmap, BeatmapManager beatmaps)
|
private void load(OsuColour colours, BindableBeatmap beatmap, BeatmapManager beatmaps)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap.GetBoundCopy();
|
this.beatmap = beatmap.GetBoundCopy();
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Overlays
|
|||||||
private Container dragContainer;
|
private Container dragContainer;
|
||||||
private Container playerContainer;
|
private Container playerContainer;
|
||||||
|
|
||||||
private GameBeatmap beatmap;
|
private BindableBeatmap beatmap;
|
||||||
|
|
||||||
public MusicController()
|
public MusicController()
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(GameBeatmap beatmap, BeatmapManager beatmaps, OsuColour colours, LocalisationEngine localisation)
|
private void load(BindableBeatmap beatmap, BeatmapManager beatmaps, OsuColour colours, LocalisationEngine localisation)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap.GetBoundCopy();
|
this.beatmap = beatmap.GetBoundCopy();
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, IFrameBasedClock framedClock)
|
private void load(IBindableBeatmap beatmap, IFrameBasedClock framedClock)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, OsuColour colours)
|
private void load(IBindableBeatmap beatmap, OsuColour colours)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
background.Colour = colours.Gray1;
|
background.Colour = colours.Gray1;
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap)
|
private void load(IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap)
|
private void load(IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Edit.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap)
|
private void load(IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DidLoadMenu;
|
public bool DidLoadMenu;
|
||||||
|
|
||||||
private GameBeatmap beatmapBacking;
|
private BindableBeatmap beatmapBacking;
|
||||||
|
|
||||||
private MainMenu mainMenu;
|
private MainMenu mainMenu;
|
||||||
private SampleChannel welcome;
|
private SampleChannel welcome;
|
||||||
@ -46,7 +46,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private WorkingBeatmap beatmap;
|
private WorkingBeatmap beatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, GameBeatmap beatmap)
|
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, BindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
beatmapBacking = beatmap.GetBoundCopy();
|
beatmapBacking = beatmap.GetBoundCopy();
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ShaderManager shaders, IGameBeatmap beatmap)
|
private void load(ShaderManager shaders, IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
|
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, OsuColour colours)
|
private void load(IBindableBeatmap beatmap, OsuColour colours)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ namespace osu.Game.Screens
|
|||||||
private SampleChannel sampleExit;
|
private SampleChannel sampleExit;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(IGameBeatmap beatmap, OsuGame osuGame, AudioManager audio)
|
private void load(IBindableBeatmap beatmap, OsuGame osuGame, AudioManager audio)
|
||||||
{
|
{
|
||||||
if (beatmap != null)
|
if (beatmap != null)
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Screens.Select
|
|||||||
protected readonly BeatmapDetailArea BeatmapDetails;
|
protected readonly BeatmapDetailArea BeatmapDetails;
|
||||||
private bool removeAutoModOnResume;
|
private bool removeAutoModOnResume;
|
||||||
|
|
||||||
private GameBeatmap beatmap;
|
private BindableBeatmap beatmap;
|
||||||
|
|
||||||
public PlaySongSelect()
|
public PlaySongSelect()
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ namespace osu.Game.Screens.Select
|
|||||||
public readonly Bindable<IEnumerable<Mod>> SelectedMods = new Bindable<IEnumerable<Mod>>(new List<Mod>());
|
public readonly Bindable<IEnumerable<Mod>> SelectedMods = new Bindable<IEnumerable<Mod>>(new List<Mod>());
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuColour colours, AudioManager audio, BeatmapManager beatmaps, DialogOverlay dialogOverlay, OsuGame osu, GameBeatmap beatmap)
|
private void load(OsuColour colours, AudioManager audio, BeatmapManager beatmaps, DialogOverlay dialogOverlay, OsuGame osu, BindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap.GetBoundCopy();
|
this.beatmap = beatmap.GetBoundCopy();
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Screens.Select
|
|||||||
private SampleChannel sampleChangeDifficulty;
|
private SampleChannel sampleChangeDifficulty;
|
||||||
private SampleChannel sampleChangeBeatmap;
|
private SampleChannel sampleChangeBeatmap;
|
||||||
|
|
||||||
private GameBeatmap beatmap;
|
private BindableBeatmap beatmap;
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
||||||
@ -179,7 +179,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours, GameBeatmap beatmap)
|
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours, BindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap.GetBoundCopy();
|
this.beatmap = beatmap.GetBoundCopy();
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, TextureStore textureStore)
|
private void load(IBindableBeatmap beatmap, TextureStore textureStore)
|
||||||
{
|
{
|
||||||
var basePath = Animation.Path.ToLowerInvariant();
|
var basePath = Animation.Path.ToLowerInvariant();
|
||||||
for (var frame = 0; frame < Animation.FrameCount; frame++)
|
for (var frame = 0; frame < Animation.FrameCount; frame++)
|
||||||
|
@ -63,7 +63,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, TextureStore textureStore)
|
private void load(IBindableBeatmap beatmap, TextureStore textureStore)
|
||||||
{
|
{
|
||||||
var spritePath = Sprite.Path.ToLowerInvariant();
|
var spritePath = Sprite.Path.ToLowerInvariant();
|
||||||
var path = beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
var path = beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public abstract class OsuTestCase : TestCase
|
public abstract class OsuTestCase : TestCase
|
||||||
{
|
{
|
||||||
private readonly OsuTestBeatmap beatmap = new OsuTestBeatmap(new DummyWorkingBeatmap());
|
private readonly OsuTestBeatmap beatmap = new OsuTestBeatmap(new DummyWorkingBeatmap());
|
||||||
protected GameBeatmap Beatmap => beatmap;
|
protected BindableBeatmap Beatmap => beatmap;
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
||||||
|
|
||||||
dependencies.CacheAs<GameBeatmap>(beatmap);
|
dependencies.CacheAs<BindableBeatmap>(beatmap);
|
||||||
dependencies.CacheAs<IGameBeatmap>(beatmap);
|
dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public void RunTestBlocking(TestCase test) => runner.RunTestBlocking(test);
|
public void RunTestBlocking(TestCase test) => runner.RunTestBlocking(test);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class OsuTestBeatmap : GameBeatmap
|
private class OsuTestBeatmap : BindableBeatmap
|
||||||
{
|
{
|
||||||
public OsuTestBeatmap(WorkingBeatmap defaultValue)
|
public OsuTestBeatmap(WorkingBeatmap defaultValue)
|
||||||
: base(defaultValue)
|
: base(defaultValue)
|
||||||
@ -72,7 +72,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public void SetAudioManager(AudioManager audioManager) => RegisterAudioManager(audioManager);
|
public void SetAudioManager(AudioManager audioManager) => RegisterAudioManager(audioManager);
|
||||||
|
|
||||||
public override GameBeatmap GetBoundCopy()
|
public override BindableBeatmap GetBoundCopy()
|
||||||
{
|
{
|
||||||
var copy = new OsuTestBeatmap(Default);
|
var copy = new OsuTestBeatmap(Default);
|
||||||
copy.BindTo(this);
|
copy.BindTo(this);
|
||||||
|
@ -108,9 +108,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
private readonly Container<BeatmapDisplay> beatmapDisplays;
|
private readonly Container<BeatmapDisplay> beatmapDisplays;
|
||||||
private readonly Ruleset ruleset;
|
private readonly Ruleset ruleset;
|
||||||
private readonly GameBeatmap beatmapBindable;
|
private readonly BindableBeatmap beatmapBindable;
|
||||||
|
|
||||||
public BeatmapList(Ruleset ruleset, GameBeatmap beatmapBindable)
|
public BeatmapList(Ruleset ruleset, BindableBeatmap beatmapBindable)
|
||||||
{
|
{
|
||||||
this.ruleset = ruleset;
|
this.ruleset = ruleset;
|
||||||
this.beatmapBindable = beatmapBindable;
|
this.beatmapBindable = beatmapBindable;
|
||||||
@ -140,7 +140,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
private readonly OsuSpriteText text;
|
private readonly OsuSpriteText text;
|
||||||
private readonly BeatmapInfo beatmap;
|
private readonly BeatmapInfo beatmap;
|
||||||
|
|
||||||
private readonly GameBeatmap beatmapBindable;
|
private readonly BindableBeatmap beatmapBindable;
|
||||||
|
|
||||||
private BeatmapManager beatmaps;
|
private BeatmapManager beatmaps;
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public string TooltipText => text.Text;
|
public string TooltipText => text.Text;
|
||||||
|
|
||||||
public BeatmapDisplay(BeatmapInfo beatmap, GameBeatmap beatmapBindable)
|
public BeatmapDisplay(BeatmapInfo beatmap, BindableBeatmap beatmapBindable)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
this.beatmapBindable = beatmapBindable;
|
this.beatmapBindable = beatmapBindable;
|
||||||
@ -223,7 +223,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap, APIAccess api)
|
private void load(IBindableBeatmap beatmap, APIAccess api)
|
||||||
{
|
{
|
||||||
this.api = api;
|
this.api = api;
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IGameBeatmap beatmap)
|
private void load(IBindableBeatmap beatmap)
|
||||||
{
|
{
|
||||||
beatmap.ValueChanged += beatmapChanged;
|
beatmap.ValueChanged += beatmapChanged;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user