diff --git a/osu-resources b/osu-resources index 12bbab717d..0d6dc29473 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit 12bbab717d372dadbd3220d38da862276ac97e98 +Subproject commit 0d6dc294738d433999c6c68ff61169d3a8e6ce5f diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index cb7a3e3f84..99da7d1c73 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -112,7 +112,7 @@ namespace osu.Desktop.VisualTests.Tests Width = 150, Height = 10, SelectionColor = Color4.Orange, - Bindable = playbackSpeed + Value = playbackSpeed } } }); diff --git a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs index 3dba201f5d..7e7782662b 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs @@ -57,7 +57,7 @@ namespace osu.Desktop.VisualTests.Tests Width = 150, Height = 10, SelectionColor = Color4.Orange, - Bindable = bindable + Value = bindable } } }); diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs b/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs index 780ff7b833..2d3969b822 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs @@ -36,9 +36,9 @@ namespace osu.Desktop.VisualTests.Tests filter.PinItem(GroupMode.All); filter.PinItem(GroupMode.RecentlyPlayed); - filter.SelectedItem.ValueChanged += (sender, args) => + filter.SelectedItem.ValueChanged += newFilter => { - text.Text = "Currently Selected: " + filter.SelectedItem.ToString(); + text.Text = "Currently Selected: " + newFilter.ToString(); }; } } diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 89399a56ff..534578337f 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -22,8 +22,9 @@ namespace osu.Game.Beatmaps.Drawables public Action GainedSelection; private readonly SpriteText title; private readonly SpriteText artist; - private OsuConfigManager config; + private Bindable preferUnicode; + private readonly WorkingBeatmap beatmap; private readonly FillFlowContainer difficultyIcons; @@ -83,24 +84,13 @@ namespace osu.Game.Beatmaps.Drawables [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - this.config = config; - preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); - preferUnicode.ValueChanged += preferUnicode_changed; - preferUnicode_changed(preferUnicode, null); - } - - private void preferUnicode_changed(object sender, EventArgs e) - { - title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode); - artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode); - } - - protected override void Dispose(bool isDisposing) - { - if (preferUnicode != null) - preferUnicode.ValueChanged -= preferUnicode_changed; - base.Dispose(isDisposing); + preferUnicode.ValueChanged += unicode => + { + title.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.TitleUnicode : beatmap.BeatmapSetInfo.Metadata.Title; + artist.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.ArtistUnicode : beatmap.BeatmapSetInfo.Metadata.Artist; + }; + preferUnicode.TriggerChange(); } private class PanelBackground : BufferedContainer diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 6190678e1e..a4a960a7bc 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -187,10 +187,6 @@ namespace osu.Game.Configuration #pragma warning restore CS0612 // Type or member is obsolete } - //todo: make a UnicodeString class/struct rather than requiring this helper method. - public string GetUnicodeString(string nonunicode, string unicode) - => Get(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode; - public OsuConfigManager(Storage storage) : base(storage) { } diff --git a/osu.Game/Graphics/Cursor/GameplayCursor.cs b/osu.Game/Graphics/Cursor/GameplayCursor.cs index 3f94bbaddc..3f699219a4 100644 --- a/osu.Game/Graphics/Cursor/GameplayCursor.cs +++ b/osu.Game/Graphics/Cursor/GameplayCursor.cs @@ -12,7 +12,6 @@ using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Sprites; using osu.Framework.Input; using osu.Game.Configuration; -using System; namespace osu.Game.Graphics.Cursor { @@ -116,14 +115,9 @@ namespace osu.Game.Graphics.Cursor }; cursorScale = config.GetBindable(OsuConfig.GameplayCursorSize); - cursorScale.ValueChanged += scaleChanged; + cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)cursorScale); cursorScale.TriggerChange(); } - - private void scaleChanged(object sender, EventArgs e) - { - cursorContainer.Scale = new Vector2((float)cursorScale); - } } } } diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 67b17fae5c..0fb7f59212 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -131,14 +131,9 @@ namespace osu.Game.Graphics.Cursor }; cursorScale = config.GetBindable(OsuConfig.MenuCursorSize); - cursorScale.ValueChanged += scaleChanged; + cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale); cursorScale.TriggerChange(); } - - private void scaleChanged(object sender, EventArgs e) - { - cursorContainer.Scale = new Vector2((float)cursorScale); - } } } } diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index fc44d80ea6..6a5151b90c 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; @@ -86,9 +85,9 @@ namespace osu.Game.Graphics.UserInterface }; } - private void bindableValueChanged(object sender, EventArgs e) + private void bindableValueChanged(bool isChecked) { - State = bindable.Value ? CheckboxState.Checked : CheckboxState.Unchecked; + State = isChecked ? CheckboxState.Checked : CheckboxState.Unchecked; } protected override void Dispose(bool isDisposing) diff --git a/osu.Game/Graphics/UserInterface/RollingCounter.cs b/osu.Game/Graphics/UserInterface/RollingCounter.cs index a4f6092d66..12eeb771dd 100644 --- a/osu.Game/Graphics/UserInterface/RollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/RollingCounter.cs @@ -98,13 +98,10 @@ namespace osu.Game.Graphics.UserInterface DisplayedCount = Current; - Current.ValueChanged += currentChanged; - } - - private void currentChanged(object sender, EventArgs e) - { - if (IsLoaded) - TransformCount(displayedCount, Current); + Current.ValueChanged += newValue => + { + if (IsLoaded) TransformCount(displayedCount, newValue); + }; } protected override void LoadComplete() diff --git a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs index 374385e351..4933c170e8 100644 --- a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs +++ b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input; @@ -19,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface.Volume protected override bool HideOnEscape => false; - private void volumeChanged(object sender, EventArgs e) + private void volumeChanged(double newVolume) { Show(); schedulePopOut(); diff --git a/osu.Game/Modes/UI/ComboCounter.cs b/osu.Game/Modes/UI/ComboCounter.cs index 3629634889..8c0327fa04 100644 --- a/osu.Game/Modes/UI/ComboCounter.cs +++ b/osu.Game/Modes/UI/ComboCounter.cs @@ -66,12 +66,7 @@ namespace osu.Game.Modes.UI TextSize = 80; - Current.ValueChanged += comboChanged; - } - - private void comboChanged(object sender, System.EventArgs e) - { - updateCount(Current.Value == 0); + Current.ValueChanged += newValue => updateCount(newValue == 0); } protected override void LoadComplete() diff --git a/osu.Game/Modes/UI/HealthDisplay.cs b/osu.Game/Modes/UI/HealthDisplay.cs index 3471f4bc3f..4c8d7e4ab8 100644 --- a/osu.Game/Modes/UI/HealthDisplay.cs +++ b/osu.Game/Modes/UI/HealthDisplay.cs @@ -16,7 +16,7 @@ namespace osu.Game.Modes.UI protected HealthDisplay() { - Current.ValueChanged += (s, e) => SetHealth((float)Current); + Current.ValueChanged += newValue => SetHealth((float)newValue); } protected abstract void SetHealth(float value); diff --git a/osu.Game/Modes/UI/HudOverlay.cs b/osu.Game/Modes/UI/HudOverlay.cs index a6c54e7f3a..945f4a2fa8 100644 --- a/osu.Game/Modes/UI/HudOverlay.cs +++ b/osu.Game/Modes/UI/HudOverlay.cs @@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers; using osu.Game.Configuration; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Play; -using System; using osu.Game.Modes.Scoring; namespace osu.Game.Modes.UI @@ -47,18 +46,16 @@ namespace osu.Game.Modes.UI private void load(OsuConfigManager config) { showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); - showKeyCounter.ValueChanged += visibilityChanged; + showKeyCounter.ValueChanged += visibility => + { + if (visibility) + KeyCounter.Show(); + else + KeyCounter.Hide(); + }; showKeyCounter.TriggerChange(); } - private void visibilityChanged(object sender, EventArgs e) - { - if (showKeyCounter) - KeyCounter.Show(); - else - KeyCounter.Hide(); - } - public void BindProcessor(ScoreProcessor processor) { //bind processor bindables to combocounter, score display etc. diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 0272438927..2b9f8e86a9 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -39,9 +39,9 @@ namespace osu.Game.Overlays.Mods public readonly Bindable PlayMode = new Bindable(); - private void modeChanged(object sender, EventArgs eventArgs) + private void modeChanged(PlayMode newMode) { - var ruleset = Ruleset.GetRuleset(PlayMode); + var ruleset = Ruleset.GetRuleset(newMode); foreach (ModSection section in modSectionsContainer.Children) section.Buttons = ruleset.GetModsFor(section.ModType).Select(m => new ModButton(m)).ToArray(); refreshSelectedMods(); @@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Mods if (osu != null) PlayMode.BindTo(osu.PlayMode); PlayMode.ValueChanged += modeChanged; - modeChanged(null, null); + PlayMode.TriggerChange(); } protected override void PopOut() diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index aa0ea1ae9b..9f3eeb47a0 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -78,8 +78,6 @@ namespace osu.Game.Overlays [BackgroundDependencyLoader] private void load(OsuGameBase game, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours) { - unicodeString = config.GetUnicodeString; - Children = new Drawable[] { dragContainer = new Container @@ -210,7 +208,7 @@ namespace osu.Game.Overlays this.beatmaps = beatmaps; trackManager = game.Audio.Track; preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); - preferUnicode.ValueChanged += preferUnicode_changed; + preferUnicode.ValueChanged += unicode => updateDisplay(current, TransformDirection.None); beatmapSource = game.Beatmap ?? new Bindable(); playList = beatmaps.GetAllWithChildren(); @@ -222,7 +220,8 @@ namespace osu.Game.Overlays protected override void LoadComplete() { beatmapSource.ValueChanged += workingChanged; - workingChanged(); + beatmapSource.TriggerChange(); + base.LoadComplete(); } @@ -247,17 +246,12 @@ namespace osu.Game.Overlays playButton.Icon = FontAwesome.fa_play_circle_o; } - private void preferUnicode_changed(object sender, EventArgs e) + private void workingChanged(WorkingBeatmap beatmap) { - updateDisplay(current, TransformDirection.None); - } - - private void workingChanged(object sender = null, EventArgs e = null) - { - progress.IsEnabled = beatmapSource.Value != null; - if (beatmapSource.Value == current) return; - bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmapSource?.Value?.BeatmapInfo) ?? false; - current = beatmapSource.Value; + progress.IsEnabled = beatmap != null; + if (beatmap == current) return; + bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmap?.BeatmapInfo) ?? false; + current = beatmap; updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next); appendToHistory(current?.BeatmapInfo); } @@ -342,8 +336,8 @@ namespace osu.Game.Overlays else { BeatmapMetadata metadata = beatmap.Beatmap.BeatmapInfo.Metadata; - title.Text = unicodeString(metadata.Title, metadata.TitleUnicode); - artist.Text = unicodeString(metadata.Artist, metadata.ArtistUnicode); + title.Text = preferUnicode ? metadata.TitleUnicode : metadata.Title; + artist.Text = preferUnicode ? metadata.ArtistUnicode : metadata.Artist; } }); @@ -374,21 +368,12 @@ namespace osu.Game.Overlays }; } - private Func unicodeString; - private void seek(float position) { current?.Track?.Seek(current.Track.Length * position); current?.Track?.Start(); } - protected override void Dispose(bool isDisposing) - { - if (preferUnicode != null) - preferUnicode.ValueChanged -= preferUnicode_changed; - base.Dispose(isDisposing); - } - private const float transition_length = 800; protected override void PopIn() diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 772d2c37e6..8fa9bf063d 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -29,10 +29,10 @@ namespace osu.Game.Overlays.Options public BindableNumber Bindable { - get { return slider.Bindable; } + get { return slider.Value; } set { - slider.Bindable = value; + slider.Value = value; if (value?.Disabled ?? true) Alpha = 0.3f; } diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 47c81e6a7e..722f24d50d 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Configuration; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics.UserInterface; @@ -41,10 +40,7 @@ namespace osu.Game.Overlays.Options bindable.Value = Text; } - private void bindableValueChanged(object sender, EventArgs e) - { - Text = bindable.Value; - } + private void bindableValueChanged(string newValue) => Text = newValue; protected override void Dispose(bool isDisposing) { diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index 8c4930d99d..b04f853ec4 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -5,7 +5,6 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; -using System; namespace osu.Game.Overlays.Options.Sections.Graphics { @@ -52,9 +51,9 @@ namespace osu.Game.Overlays.Options.Sections.Graphics letterboxing.TriggerChange(); } - private void visibilityChanged(object sender, EventArgs e) + private void visibilityChanged(bool newVisibility) { - if (letterboxing) + if (newVisibility) { letterboxPositionX.Show(); letterboxPositionY.Show(); diff --git a/osu.Game/Screens/OsuGameScreen.cs b/osu.Game/Screens/OsuGameScreen.cs index a5c6cec09e..3e832b36fa 100644 --- a/osu.Game/Screens/OsuGameScreen.cs +++ b/osu.Game/Screens/OsuGameScreen.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Screens; @@ -40,11 +39,6 @@ namespace osu.Game.Screens } } - private void beatmap_ValueChanged(object sender, EventArgs e) - { - OnBeatmapChanged(beatmap.Value); - } - [BackgroundDependencyLoader(permitNulls: true)] private void load(OsuGameBase game) { @@ -57,7 +51,7 @@ namespace osu.Game.Screens beatmap.Value = localMap; } - beatmap.ValueChanged += beatmap_ValueChanged; + beatmap.ValueChanged += OnBeatmapChanged; } protected virtual void OnBeatmapChanged(WorkingBeatmap beatmap) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index c678e9bf37..b263b5507c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -275,7 +275,8 @@ namespace osu.Game.Screens.Play Background?.FadeTo((100f - dimLevel) / 100, 1500, EasingTypes.OutQuint); Content.Alpha = 0; - dimLevel.ValueChanged += dimChanged; + + dimLevel.ValueChanged += newDim => Background?.FadeTo((100f - newDim) / 100, 800); Content.ScaleTo(0.7f); @@ -318,18 +319,11 @@ namespace osu.Game.Screens.Play { FadeOut(250); Content.ScaleTo(0.7f, 750, EasingTypes.InQuint); - - dimLevel.ValueChanged -= dimChanged; Background?.FadeTo(1f, 200); return base.OnExiting(next); } } - private void dimChanged(object sender, EventArgs e) - { - Background?.FadeTo((100f - dimLevel) / 100, 800); - } - private Bindable mouseWheelDisabled; protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !IsPaused; diff --git a/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs b/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs index c9ea9e884e..c52d0397ed 100644 --- a/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs +++ b/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs @@ -61,7 +61,7 @@ namespace osu.Game.Screens.Select }, }; - tabs.SelectedItem.ValueChanged += (sender, e) => invokeOnFilter(); + tabs.SelectedItem.ValueChanged += item => invokeOnFilter(); modsCheckbox.Action += (sender, e) => invokeOnFilter(); tabs.SelectedItem.Value = BeatmapDetailTab.Global; diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 5445847da5..26daddc3a9 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -151,8 +151,8 @@ namespace osu.Game.Screens.Select groupTabs.PinItem(GroupMode.All); groupTabs.PinItem(GroupMode.RecentlyPlayed); - groupTabs.ItemChanged += (sender, value) => Group = value; - sortTabs.ItemChanged += (sender, value) => Sort = value; + groupTabs.SelectedItem.ValueChanged += val => Group = val; + sortTabs.SelectedItem.ValueChanged += val => Sort = val; } public void Deactivate() @@ -175,7 +175,7 @@ namespace osu.Game.Screens.Select if (osu != null) playMode.BindTo(osu.PlayMode); - playMode.ValueChanged += (s, e) => FilterChanged?.Invoke(CreateCriteria()); + playMode.ValueChanged += val => FilterChanged?.Invoke(CreateCriteria()); } protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 656adf0d62..44204f5beb 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Linq; using System.Threading; using OpenTK; @@ -170,7 +169,7 @@ namespace osu.Game.Screens.Select if (osu != null) playMode.BindTo(osu.PlayMode); - playMode.ValueChanged += playMode_ValueChanged; + playMode.ValueChanged += val => Beatmap.PreferredPlayMode = val; if (database == null) database = beatmaps; @@ -276,8 +275,6 @@ namespace osu.Game.Screens.Select initialAddSetsTask.Cancel(); } - private void playMode_ValueChanged(object sender, EventArgs e) => Beatmap.PreferredPlayMode = playMode; - private void changeBackground(WorkingBeatmap beatmap) { var backgroundModeBeatmap = Background as BackgroundScreenBeatmap;