// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK.Graphics; using osu.Framework.Screens; using osu.Game.Beatmaps; using osu.Game.Screens.Backgrounds; namespace osu.Game.Screens.Edit { internal class Editor : ScreenWhiteBox { private WorkingBeatmap beatmap; public Editor(WorkingBeatmap workingBeatmap) { beatmap = workingBeatmap; } protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4"); protected override void OnEntering(Screen last) { base.OnEntering(last); Background.Schedule(() => Background.FadeColour(Color4.DarkGray, 500)); beatmap.Track?.Stop(); } protected override bool OnExiting(Screen next) { Background.Schedule(() => Background.FadeColour(Color4.White, 500)); beatmap.Track?.Start(); return base.OnExiting(next); } } }