private void beatmap_ValueChanged(WorkingBeatmap newValue) { if (!IsCurrentScreen) { return; } background.Next(); }
public void TestBackgroundDoesntReloadOnNoChange(BackgroundSource source, Type backgroundType) { Graphics.Backgrounds.Background last = null; setSourceMode(source); setSupporter(true); if (source == BackgroundSource.Skin) { setCustomSkin(); } AddUntilStep("wait for beatmap background to be loaded", () => (last = getCurrentBackground())?.GetType() == backgroundType); AddAssert("next doesn't load new background", () => screen.Next() == false); // doesn't really need to be checked but might as well. AddWaitStep("wait a bit", 5); AddUntilStep("ensure same background instance", () => last == getCurrentBackground()); }
public void TestBeatmapDoesntReloadOnNoChange() { BeatmapBackground last = null; setSourceMode(BackgroundSource.Beatmap); setSupporter(true); AddUntilStep("wait for beatmap background to be loaded", () => (last = getCurrentBackground() as BeatmapBackground) != null); AddAssert("next doesn't load new background", () => screen.Next() == false); // doesn't really need to be checked but might as well. AddWaitStep("wait a bit", 5); AddUntilStep("ensure same background instance", () => last == getCurrentBackground()); }
protected override void OnBeatmapChanged(WorkingBeatmap beatmap) { base.OnBeatmapChanged(beatmap); background.Next(); }