From c5ad79e3e2edbe9b4b76f4584b9083be293b5df2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 26 Feb 2017 21:15:33 +0900 Subject: [PATCH 01/27] Remove unnecessary schedule. --- osu.Game/Screens/Menu/Intro.cs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 978c21c7dd..cf804de0f4 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -69,23 +69,20 @@ namespace osu.Game.Screens.Menu { base.OnEntering(last); - Scheduler.Add(delegate + welcome.Play(); + + Scheduler.AddDelayed(delegate { - welcome.Play(); + bgm.Start(); + + (mainMenu = new MainMenu()).LoadAsync(Game); Scheduler.AddDelayed(delegate { - bgm.Start(); - - (mainMenu = new MainMenu()).LoadAsync(Game); - - Scheduler.AddDelayed(delegate - { - DidLoadMenu = true; - Push(mainMenu); - }, 2300); - }, 600); - }); + DidLoadMenu = true; + Push(mainMenu); + }, 2300); + }, 600); logo.ScaleTo(0.4f); logo.FadeOut(); From c227eb1be5314151c2c646897f41203cecea91c9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 26 Feb 2017 22:08:21 +0900 Subject: [PATCH 02/27] Welded bindables. --- osu-framework | 2 +- .../Objects/Drawables/Pieces/SliderBody.cs | 4 +- .../Beatmaps/Drawables/BeatmapSetHeader.cs | 2 +- .../Graphics/Containers/ParallaxContainer.cs | 2 +- .../Graphics/Cursor/OsuCursorContainer.cs | 4 +- osu.Game/OsuGame.cs | 2 +- osu.Game/Overlays/MusicController.cs | 2 +- .../Options/Sections/Audio/OffsetOptions.cs | 2 +- .../Options/Sections/Audio/VolumeOptions.cs | 2 +- .../Options/Sections/Debug/GCOptions.cs | 2 +- .../Options/Sections/EditorSection.cs | 12 +++--- .../Sections/Gameplay/GeneralOptions.cs | 16 ++++---- .../Sections/Gameplay/SongSelectOptions.cs | 4 +- .../Sections/General/LanguageOptions.cs | 4 +- .../Options/Sections/General/LoginOptions.cs | 4 +- .../Options/Sections/General/UpdateOptions.cs | 2 +- .../Sections/Graphics/DetailOptions.cs | 18 ++++----- .../Sections/Graphics/LayoutOptions.cs | 8 ++-- .../Sections/Graphics/MainMenuOptions.cs | 10 ++--- .../Sections/Graphics/RendererOptions.cs | 8 ++-- .../Graphics/SongSelectGraphicsOptions.cs | 2 +- .../Options/Sections/Input/MouseOptions.cs | 14 +++---- .../Sections/Input/OtherInputOptions.cs | 4 +- .../Sections/Online/InGameChatOptions.cs | 12 +++--- .../Sections/Online/IntegrationOptions.cs | 8 ++-- .../Sections/Online/NotificationsOptions.cs | 12 +++--- .../Options/Sections/Online/PrivacyOptions.cs | 4 +- .../Overlays/Options/Sections/SkinSection.cs | 12 +++--- osu.Game/Screens/OsuGameScreen.cs | 40 ++----------------- osu.Game/Screens/Play/Player.cs | 2 +- osu.Game/Screens/Play/PlayerInputManager.cs | 2 +- 31 files changed, 94 insertions(+), 128 deletions(-) diff --git a/osu-framework b/osu-framework index 7cad7cf48b..12fbf2b94a 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 7cad7cf48b2ae9f16cac503d46bd0ea801e7561f +Subproject commit 12fbf2b94af0ddef9daf0fab11c05288dee054a7 diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs index 7f7d558294..e75441c812 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs @@ -79,8 +79,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - snakingIn = config.GetBindable(OsuConfig.SnakingInSliders); - snakingOut = config.GetBindable(OsuConfig.SnakingOutSliders); + snakingIn = config.GetWeldedBindable(OsuConfig.SnakingInSliders); + snakingOut = config.GetWeldedBindable(OsuConfig.SnakingOutSliders); int textureWidth = (int)PathWidth * 2; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 8681259272..8c9e135d49 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -79,7 +79,7 @@ namespace osu.Game.Beatmaps.Drawables { this.config = config; - preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); + preferUnicode = config.GetWeldedBindable(OsuConfig.ShowUnicode); preferUnicode.ValueChanged += preferUnicode_changed; preferUnicode_changed(preferUnicode, null); } diff --git a/osu.Game/Graphics/Containers/ParallaxContainer.cs b/osu.Game/Graphics/Containers/ParallaxContainer.cs index 1908bd0aa2..f180100fb0 100644 --- a/osu.Game/Graphics/Containers/ParallaxContainer.cs +++ b/osu.Game/Graphics/Containers/ParallaxContainer.cs @@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers private void load(UserInputManager input, OsuConfigManager config) { this.input = input; - parallaxEnabled = config.GetBindable(OsuConfig.MenuParallax); + parallaxEnabled = config.GetWeldedBindable(OsuConfig.MenuParallax); parallaxEnabled.ValueChanged += delegate { if (!parallaxEnabled) diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 8011359db9..07caa2055e 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -43,7 +43,7 @@ namespace osu.Game.Graphics.Cursor class OsuCursor : Container { private Container cursorContainer; - private BindableDouble cursorScale; + private Bindable cursorScale; public OsuCursor() { @@ -54,7 +54,7 @@ namespace osu.Game.Graphics.Cursor [BackgroundDependencyLoader] private void load(TextureStore textures, OsuConfigManager config) { - cursorScale = (BindableDouble)config.GetBindable(OsuConfig.CursorSize); + cursorScale = config.GetWeldedBindable(OsuConfig.CursorSize); Children = new Drawable[] { diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index b8a8fe0618..daa4f38c15 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -87,7 +87,7 @@ namespace osu.Game Dependencies.Cache(this); - PlayMode = LocalConfig.GetBindable(OsuConfig.PlayMode); + PlayMode = LocalConfig.GetWeldedBindable(OsuConfig.PlayMode); } protected async void ImportBeatmapsAsync(IEnumerable paths) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 661cbe06a4..c39856f3b6 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -211,7 +211,7 @@ namespace osu.Game.Overlays this.beatmaps = beatmaps; trackManager = osuGame.Audio.Track; - preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); + preferUnicode = config.GetWeldedBindable(OsuConfig.ShowUnicode); preferUnicode.ValueChanged += preferUnicode_changed; beatmapSource = osuGame.Beatmap ?? new Bindable(); diff --git a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs index 2602565c29..83072d7c97 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio new OptionSlider { LabelText = "Universal Offset", - Bindable = (BindableInt)config.GetBindable(OsuConfig.Offset) + Bindable = (BindableInt)config.GetWeldedBindable(OsuConfig.Offset) }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs index d8e8964b17..510a02a40d 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs @@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio new OsuCheckbox { LabelText = "Ignore beatmap hitsounds", - Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSamples) + Bindable = config.GetWeldedBindable(OsuConfig.IgnoreBeatmapSamples) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs index 2f04bfe88b..26b3023f47 100644 --- a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs @@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug new OptionEnumDropDown { LabelText = "Active mode", - Bindable = config.GetBindable(FrameworkDebugConfig.ActiveGCMode) + Bindable = config.GetWeldedBindable(FrameworkDebugConfig.ActiveGCMode) }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs index 513d89c601..b81a248901 100644 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ b/osu.Game/Overlays/Options/Sections/EditorSection.cs @@ -24,32 +24,32 @@ namespace osu.Game.Overlays.Options.Sections new OsuCheckbox { LabelText = "Background video", - Bindable = config.GetBindable(OsuConfig.VideoEditor) + Bindable = config.GetWeldedBindable(OsuConfig.VideoEditor) }, new OsuCheckbox { LabelText = "Always use default skin", - Bindable = config.GetBindable(OsuConfig.EditorDefaultSkin) + Bindable = config.GetWeldedBindable(OsuConfig.EditorDefaultSkin) }, new OsuCheckbox { LabelText = "Snaking sliders", - Bindable = config.GetBindable(OsuConfig.EditorSnakingSliders) + Bindable = config.GetWeldedBindable(OsuConfig.EditorSnakingSliders) }, new OsuCheckbox { LabelText = "Hit animations", - Bindable = config.GetBindable(OsuConfig.EditorHitAnimations) + Bindable = config.GetWeldedBindable(OsuConfig.EditorHitAnimations) }, new OsuCheckbox { LabelText = "Follow points", - Bindable = config.GetBindable(OsuConfig.EditorFollowPoints) + Bindable = config.GetWeldedBindable(OsuConfig.EditorFollowPoints) }, new OsuCheckbox { LabelText = "Stacking", - Bindable = config.GetBindable(OsuConfig.EditorStacking) + Bindable = config.GetWeldedBindable(OsuConfig.EditorStacking) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs index 1c28f6247d..505e8efc5b 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs @@ -21,42 +21,42 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay new OptionSlider { LabelText = "Background dim", - Bindable = (BindableInt)config.GetBindable(OsuConfig.DimLevel) + Bindable = (BindableInt)config.GetWeldedBindable(OsuConfig.DimLevel) }, new OptionEnumDropDown { LabelText = "Progress display", - Bindable = config.GetBindable(OsuConfig.ProgressBarType) + Bindable = config.GetWeldedBindable(OsuConfig.ProgressBarType) }, new OptionEnumDropDown { LabelText = "Score meter type", - Bindable = config.GetBindable(OsuConfig.ScoreMeter) + Bindable = config.GetWeldedBindable(OsuConfig.ScoreMeter) }, new OptionSlider { LabelText = "Score meter size", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.ScoreMeterScale) + Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.ScoreMeterScale) }, new OsuCheckbox { LabelText = "Always show key overlay", - Bindable = config.GetBindable(OsuConfig.KeyOverlay) + Bindable = config.GetWeldedBindable(OsuConfig.KeyOverlay) }, new OsuCheckbox { LabelText = "Show approach circle on first \"Hidden\" object", - Bindable = config.GetBindable(OsuConfig.HiddenShowFirstApproach) + Bindable = config.GetWeldedBindable(OsuConfig.HiddenShowFirstApproach) }, new OsuCheckbox { LabelText = "Scale osu!mania scroll speed with BPM", - Bindable = config.GetBindable(OsuConfig.ManiaSpeedBPMScale) + Bindable = config.GetWeldedBindable(OsuConfig.ManiaSpeedBPMScale) }, new OsuCheckbox { LabelText = "Remember osu!mania scroll speed per beatmap", - Bindable = config.GetBindable(OsuConfig.UsePerBeatmapManiaSpeed) + Bindable = config.GetWeldedBindable(OsuConfig.UsePerBeatmapManiaSpeed) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs index be38a9847a..d78916b223 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay new OptionSlider { LabelText = "Display beatmaps from", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.DisplayStarsMinimum) + Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.DisplayStarsMinimum) }, new OptionSlider { LabelText = "up to", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.DisplayStarsMaximum) + Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.DisplayStarsMaximum) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs index dc29b56f44..c45395ad68 100644 --- a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs @@ -21,12 +21,12 @@ namespace osu.Game.Overlays.Options.Sections.General new OsuCheckbox { LabelText = "Prefer metadata in original language", - Bindable = config.GetBindable(OsuConfig.ShowUnicode) + Bindable = config.GetWeldedBindable(OsuConfig.ShowUnicode) }, new OsuCheckbox { LabelText = "Use alternative font for chat display", - Bindable = config.GetBindable(OsuConfig.AlternativeChatFont) + Bindable = config.GetWeldedBindable(OsuConfig.AlternativeChatFont) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 34f42aac43..16f316c25e 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -122,12 +122,12 @@ namespace osu.Game.Overlays.Options.Sections.General new OsuCheckbox { LabelText = "Remember username", - Bindable = config.GetBindable(OsuConfig.SaveUsername), + Bindable = config.GetWeldedBindable(OsuConfig.SaveUsername), }, new OsuCheckbox { LabelText = "Stay logged in", - Bindable = config.GetBindable(OsuConfig.SavePassword), + Bindable = config.GetWeldedBindable(OsuConfig.SavePassword), }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs index c45dc9cbd4..74feb73462 100644 --- a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.General new OptionEnumDropDown { LabelText = "Release stream", - Bindable = config.GetBindable(OsuConfig.ReleaseStream), + Bindable = config.GetWeldedBindable(OsuConfig.ReleaseStream), }, new OptionLabel { Text = "Your osu! is up to date" }, // TODO: map this to reality new OsuButton diff --git a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs index e66d097094..d9649cdf65 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs @@ -20,47 +20,47 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Snaking in sliders", - Bindable = config.GetBindable(OsuConfig.SnakingInSliders) + Bindable = config.GetWeldedBindable(OsuConfig.SnakingInSliders) }, new OsuCheckbox { LabelText = "Snaking out sliders", - Bindable = config.GetBindable(OsuConfig.SnakingOutSliders) + Bindable = config.GetWeldedBindable(OsuConfig.SnakingOutSliders) }, new OsuCheckbox { LabelText = "Background video", - Bindable = config.GetBindable(OsuConfig.Video) + Bindable = config.GetWeldedBindable(OsuConfig.Video) }, new OsuCheckbox { LabelText = "Storyboards", - Bindable = config.GetBindable(OsuConfig.ShowStoryboard) + Bindable = config.GetWeldedBindable(OsuConfig.ShowStoryboard) }, new OsuCheckbox { LabelText = "Combo bursts", - Bindable = config.GetBindable(OsuConfig.ComboBurst) + Bindable = config.GetWeldedBindable(OsuConfig.ComboBurst) }, new OsuCheckbox { LabelText = "Hit lighting", - Bindable = config.GetBindable(OsuConfig.HitLighting) + Bindable = config.GetWeldedBindable(OsuConfig.HitLighting) }, new OsuCheckbox { LabelText = "Shaders", - Bindable = config.GetBindable(OsuConfig.Bloom) + Bindable = config.GetWeldedBindable(OsuConfig.Bloom) }, new OsuCheckbox { LabelText = "Softening filter", - Bindable = config.GetBindable(OsuConfig.BloomSoftening) + Bindable = config.GetWeldedBindable(OsuConfig.BloomSoftening) }, new OptionEnumDropDown { LabelText = "Screenshot", - Bindable = config.GetBindable(OsuConfig.ScreenshotFormat) + Bindable = config.GetWeldedBindable(OsuConfig.ScreenshotFormat) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index a3dbb9c76f..66dbb3c75e 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -21,22 +21,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OptionEnumDropDown { LabelText = "Screen mode", - Bindable = config.GetBindable(FrameworkConfig.WindowMode), + Bindable = config.GetWeldedBindable(FrameworkConfig.WindowMode), }, new OsuCheckbox { LabelText = "Letterboxing", - Bindable = config.GetBindable(FrameworkConfig.Letterboxing), + Bindable = config.GetWeldedBindable(FrameworkConfig.Letterboxing), }, new OptionSlider { LabelText = "Horizontal position", - Bindable = (BindableInt)config.GetBindable(FrameworkConfig.LetterboxPositionX) + Bindable = (BindableInt)config.GetWeldedBindable(FrameworkConfig.LetterboxPositionX) }, new OptionSlider { LabelText = "Vertical position", - Bindable = (BindableInt)config.GetBindable(FrameworkConfig.LetterboxPositionY) + Bindable = (BindableInt)config.GetWeldedBindable(FrameworkConfig.LetterboxPositionY) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs index c5000d8547..6520dfc394 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs @@ -19,27 +19,27 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Snow", - Bindable = config.GetBindable(OsuConfig.MenuSnow) + Bindable = config.GetWeldedBindable(OsuConfig.MenuSnow) }, new OsuCheckbox { LabelText = "Parallax", - Bindable = config.GetBindable(OsuConfig.MenuParallax) + Bindable = config.GetWeldedBindable(OsuConfig.MenuParallax) }, new OsuCheckbox { LabelText = "Menu tips", - Bindable = config.GetBindable(OsuConfig.ShowMenuTips) + Bindable = config.GetWeldedBindable(OsuConfig.ShowMenuTips) }, new OsuCheckbox { LabelText = "Interface voices", - Bindable = config.GetBindable(OsuConfig.MenuVoice) + Bindable = config.GetWeldedBindable(OsuConfig.MenuVoice) }, new OsuCheckbox { LabelText = "osu! music theme", - Bindable = config.GetBindable(OsuConfig.MenuMusic) + Bindable = config.GetWeldedBindable(OsuConfig.MenuMusic) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs index b98337f1e6..f478d40a3f 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs @@ -23,22 +23,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OptionEnumDropDown { LabelText = "Frame limiter", - Bindable = config.GetBindable(FrameworkConfig.FrameSync) + Bindable = config.GetWeldedBindable(FrameworkConfig.FrameSync) }, new OsuCheckbox { LabelText = "Show FPS counter", - Bindable = osuConfig.GetBindable(OsuConfig.FpsCounter), + Bindable = osuConfig.GetWeldedBindable(OsuConfig.FpsCounter), }, new OsuCheckbox { LabelText = "Reduce dropped frames", - Bindable = osuConfig.GetBindable(OsuConfig.ForceFrameFlush), + Bindable = osuConfig.GetWeldedBindable(OsuConfig.ForceFrameFlush), }, new OsuCheckbox { LabelText = "Detect performance issues", - Bindable = osuConfig.GetBindable(OsuConfig.DetectPerformanceIssues), + Bindable = osuConfig.GetWeldedBindable(OsuConfig.DetectPerformanceIssues), }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs index d4855a1619..083606f141 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Show thumbnails", - Bindable = config.GetBindable(OsuConfig.SongSelectThumbnails) + Bindable = config.GetWeldedBindable(OsuConfig.SongSelectThumbnails) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs index ef1dd755b7..4a6d1fb79e 100644 --- a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs @@ -21,37 +21,37 @@ namespace osu.Game.Overlays.Options.Sections.Input new OptionSlider { LabelText = "Sensitivity", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.MouseSpeed), + Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.MouseSpeed), }, new OsuCheckbox { LabelText = "Raw input", - Bindable = config.GetBindable(OsuConfig.RawInput) + Bindable = config.GetWeldedBindable(OsuConfig.RawInput) }, new OsuCheckbox { LabelText = "Map absolute raw input to the osu! window", - Bindable = config.GetBindable(OsuConfig.AbsoluteToOsuWindow) + Bindable = config.GetWeldedBindable(OsuConfig.AbsoluteToOsuWindow) }, new OptionEnumDropDown { LabelText = "Confine mouse cursor", - Bindable = config.GetBindable(OsuConfig.ConfineMouse), + Bindable = config.GetWeldedBindable(OsuConfig.ConfineMouse), }, new OsuCheckbox { LabelText = "Disable mouse wheel in play mode", - Bindable = config.GetBindable(OsuConfig.MouseDisableWheel) + Bindable = config.GetWeldedBindable(OsuConfig.MouseDisableWheel) }, new OsuCheckbox { LabelText = "Disable mouse buttons in play mode", - Bindable = config.GetBindable(OsuConfig.MouseDisableButtons) + Bindable = config.GetWeldedBindable(OsuConfig.MouseDisableButtons) }, new OsuCheckbox { LabelText = "Cursor ripples", - Bindable = config.GetBindable(OsuConfig.CursorRipple) + Bindable = config.GetWeldedBindable(OsuConfig.CursorRipple) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs b/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs index 9323f7514b..dd3e0f81f9 100644 --- a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Input new OsuCheckbox { LabelText = "OS TabletPC support", - Bindable = config.GetBindable(OsuConfig.Tablet) + Bindable = config.GetWeldedBindable(OsuConfig.Tablet) }, new OsuCheckbox { LabelText = "Wiimote/TaTaCon Drum Support", - Bindable = config.GetBindable(OsuConfig.Wiimote) + Bindable = config.GetWeldedBindable(OsuConfig.Wiimote) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs index 9a477f40c7..7d240aa97d 100644 --- a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs @@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Filter offensive words", - Bindable = config.GetBindable(OsuConfig.ChatFilter) + Bindable = config.GetWeldedBindable(OsuConfig.ChatFilter) }, new OsuCheckbox { LabelText = "Filter foreign characters", - Bindable = config.GetBindable(OsuConfig.ChatRemoveForeign) + Bindable = config.GetWeldedBindable(OsuConfig.ChatRemoveForeign) }, new OsuCheckbox { LabelText = "Log private messages", - Bindable = config.GetBindable(OsuConfig.LogPrivateMessages) + Bindable = config.GetWeldedBindable(OsuConfig.LogPrivateMessages) }, new OsuCheckbox { LabelText = "Block private messages from non-friends", - Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) + Bindable = config.GetWeldedBindable(OsuConfig.BlockNonFriendPM) }, new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, new OptionTextBox { RelativeSizeAxes = Axes.X, - Bindable = config.GetBindable(OsuConfig.IgnoreList) + Bindable = config.GetWeldedBindable(OsuConfig.IgnoreList) }, new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, new OptionTextBox { RelativeSizeAxes = Axes.X, - Bindable = config.GetBindable(OsuConfig.HighlightWords) + Bindable = config.GetWeldedBindable(OsuConfig.HighlightWords) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs b/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs index d4298ee43c..d8c3715fb9 100644 --- a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs @@ -20,22 +20,22 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Integrate with Yahoo! status display", - Bindable = config.GetBindable(OsuConfig.YahooIntegration) + Bindable = config.GetWeldedBindable(OsuConfig.YahooIntegration) }, new OsuCheckbox { LabelText = "Integrate with MSN Live status display", - Bindable = config.GetBindable(OsuConfig.MsnIntegration) + Bindable = config.GetWeldedBindable(OsuConfig.MsnIntegration) }, new OsuCheckbox { LabelText = "Automatically start osu!direct downloads", - Bindable = config.GetBindable(OsuConfig.AutomaticDownload) + Bindable = config.GetWeldedBindable(OsuConfig.AutomaticDownload) }, new OsuCheckbox { LabelText = "Prefer no-video downloads", - Bindable = config.GetBindable(OsuConfig.AutomaticDownloadNoVideo) + Bindable = config.GetWeldedBindable(OsuConfig.AutomaticDownloadNoVideo) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs b/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs index 4614210e9f..39ae381e5d 100644 --- a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs @@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Enable chat ticker", - Bindable = config.GetBindable(OsuConfig.Ticker) + Bindable = config.GetWeldedBindable(OsuConfig.Ticker) }, new OsuCheckbox { LabelText = "Show a notification popup when someone says your name", - Bindable = config.GetBindable(OsuConfig.ChatHighlightName) + Bindable = config.GetWeldedBindable(OsuConfig.ChatHighlightName) }, new OsuCheckbox { LabelText = "Show chat message notifications", - Bindable = config.GetBindable(OsuConfig.ChatMessageNotification) + Bindable = config.GetWeldedBindable(OsuConfig.ChatMessageNotification) }, new OsuCheckbox { LabelText = "Play a sound when someone says your name", - Bindable = config.GetBindable(OsuConfig.ChatAudibleHighlight) + Bindable = config.GetWeldedBindable(OsuConfig.ChatAudibleHighlight) }, new OsuCheckbox { LabelText = "Show notification popups instantly during gameplay", - Bindable = config.GetBindable(OsuConfig.PopupDuringGameplay) + Bindable = config.GetWeldedBindable(OsuConfig.PopupDuringGameplay) }, new OsuCheckbox { LabelText = "Show notification popups when friends change status", - Bindable = config.GetBindable(OsuConfig.NotifyFriends) + Bindable = config.GetWeldedBindable(OsuConfig.NotifyFriends) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs b/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs index fb2adbb2ac..a79bc4f542 100644 --- a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Share your city location with others", - Bindable = config.GetBindable(OsuConfig.DisplayCityLocation) + Bindable = config.GetWeldedBindable(OsuConfig.DisplayCityLocation) }, new OsuCheckbox { LabelText = "Allow multiplayer game invites from all users", - Bindable = config.GetBindable(OsuConfig.AllowPublicInvites) + Bindable = config.GetWeldedBindable(OsuConfig.AllowPublicInvites) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 56dd9ca318..f7968b8f66 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -42,32 +42,32 @@ namespace osu.Game.Overlays.Options.Sections new OsuCheckbox { LabelText = "Ignore all beatmap skins", - Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSkins) + Bindable = config.GetWeldedBindable(OsuConfig.IgnoreBeatmapSkins) }, new OsuCheckbox { LabelText = "Use skin's sound samples", - Bindable = config.GetBindable(OsuConfig.SkinSamples) + Bindable = config.GetWeldedBindable(OsuConfig.SkinSamples) }, new OsuCheckbox { LabelText = "Use Taiko skin for Taiko mode", - Bindable = config.GetBindable(OsuConfig.UseTaikoSkin) + Bindable = config.GetWeldedBindable(OsuConfig.UseTaikoSkin) }, new OsuCheckbox { LabelText = "Always use skin cursor", - Bindable = config.GetBindable(OsuConfig.UseSkinCursor) + Bindable = config.GetWeldedBindable(OsuConfig.UseSkinCursor) }, new OptionSlider { LabelText = "Cursor size", - Bindable = (BindableDouble)config.GetBindable(OsuConfig.CursorSize) + Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.CursorSize) }, new OsuCheckbox { LabelText = "Automatic cursor size", - Bindable = config.GetBindable(OsuConfig.AutomaticCursorSizing) + Bindable = config.GetWeldedBindable(OsuConfig.AutomaticCursorSizing) }, }; } diff --git a/osu.Game/Screens/OsuGameScreen.cs b/osu.Game/Screens/OsuGameScreen.cs index 7aa3d5a5d0..70bf70ad1d 100644 --- a/osu.Game/Screens/OsuGameScreen.cs +++ b/osu.Game/Screens/OsuGameScreen.cs @@ -24,43 +24,20 @@ namespace osu.Game.Screens protected new OsuGameBase Game => base.Game as OsuGameBase; - private bool boundToBeatmap; - private Bindable beatmap; + private readonly Bindable beatmap = new Bindable(); public WorkingBeatmap Beatmap { get { - bindBeatmap(); return beatmap.Value; } set { - bindBeatmap(); beatmap.Value = value; } } - private void bindBeatmap() - { - if (beatmap == null) - beatmap = new Bindable(); - - if (!boundToBeatmap) - { - beatmap.ValueChanged += beatmap_ValueChanged; - boundToBeatmap = true; - } - } - - protected override void Dispose(bool isDisposing) - { - if (boundToBeatmap) - beatmap.ValueChanged -= beatmap_ValueChanged; - - base.Dispose(isDisposing); - } - private void beatmap_ValueChanged(object sender, EventArgs e) { OnBeatmapChanged(beatmap.Value); @@ -69,19 +46,8 @@ namespace osu.Game.Screens [BackgroundDependencyLoader(permitNulls: true)] private void load(OsuGameBase game) { - if (beatmap == null) - beatmap = game?.Beatmap; - } - - public override bool Push(Screen screen) - { - OsuScreen nextOsu = screen as OsuScreen; - if (nextOsu != null) - { - nextOsu.beatmap = beatmap; - } - - return base.Push(screen); + beatmap.Weld(game?.Beatmap); + beatmap.ValueChanged += beatmap_ValueChanged; } protected virtual void OnBeatmapChanged(WorkingBeatmap beatmap) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index b552601458..b94a130bdc 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -71,7 +71,7 @@ namespace osu.Game.Screens.Play [BackgroundDependencyLoader] private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config) { - dimLevel = config.GetBindable(OsuConfig.DimLevel); + dimLevel = config.GetWeldedBindable(OsuConfig.DimLevel); try { if (Beatmap == null) diff --git a/osu.Game/Screens/Play/PlayerInputManager.cs b/osu.Game/Screens/Play/PlayerInputManager.cs index 181cd68da9..3bafc3935a 100644 --- a/osu.Game/Screens/Play/PlayerInputManager.cs +++ b/osu.Game/Screens/Play/PlayerInputManager.cs @@ -25,7 +25,7 @@ namespace osu.Game.Screens.Play [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - mouseDisabled = config.GetBindable(OsuConfig.MouseDisableButtons) + mouseDisabled = config.GetWeldedBindable(OsuConfig.MouseDisableButtons) ?? new Bindable(false); } From bc231c6bd47dc31fde92ebfa057d62962e59d50d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 26 Feb 2017 22:08:29 +0900 Subject: [PATCH 03/27] Remove dispose which is no longer necessary. --- osu.Game/Screens/Play/PlayerLoader.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index e84425fbee..65beee6cac 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -38,7 +38,6 @@ namespace osu.Game.Screens.Play Interactive = false, }, }; - } [BackgroundDependencyLoader] @@ -92,11 +91,6 @@ namespace osu.Game.Screens.Play Content.ScaleTo(0.7f, 150, EasingTypes.InQuint); FadeOut(150); - //OsuScreens are currently never finalised due to the Bindable bindings. - //can be removed once we solve that one. - if (player != null && player.LoadState != LoadState.Alive) - player.Dispose(); - return base.OnExiting(next); } From 47997c20adf4c7ae54bce202b0d03ed8cd7916ce Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 12:24:50 +0900 Subject: [PATCH 04/27] Weld -> BindWith. --- .../Objects/Drawables/Pieces/SliderBody.cs | 4 ++-- .../Beatmaps/Drawables/BeatmapSetHeader.cs | 2 +- .../Graphics/Containers/ParallaxContainer.cs | 2 +- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 2 +- .../UserInterface/Volume/VolumeControl.cs | 6 +++--- osu.Game/OsuGame.cs | 2 +- osu.Game/Overlays/MusicController.cs | 2 +- .../Options/Sections/Audio/OffsetOptions.cs | 2 +- .../Options/Sections/Audio/VolumeOptions.cs | 2 +- .../Options/Sections/Debug/GCOptions.cs | 2 +- .../Overlays/Options/Sections/EditorSection.cs | 12 ++++++------ .../Sections/Gameplay/GeneralOptions.cs | 16 ++++++++-------- .../Sections/Gameplay/SongSelectOptions.cs | 4 ++-- .../Sections/General/LanguageOptions.cs | 4 ++-- .../Options/Sections/General/LoginOptions.cs | 4 ++-- .../Options/Sections/General/UpdateOptions.cs | 2 +- .../Options/Sections/Graphics/DetailOptions.cs | 18 +++++++++--------- .../Options/Sections/Graphics/LayoutOptions.cs | 8 ++++---- .../Sections/Graphics/MainMenuOptions.cs | 10 +++++----- .../Sections/Graphics/RendererOptions.cs | 8 ++++---- .../Graphics/SongSelectGraphicsOptions.cs | 2 +- .../Options/Sections/Input/MouseOptions.cs | 14 +++++++------- .../Sections/Input/OtherInputOptions.cs | 4 ++-- .../Sections/Online/InGameChatOptions.cs | 12 ++++++------ .../Sections/Online/IntegrationOptions.cs | 8 ++++---- .../Sections/Online/NotificationsOptions.cs | 12 ++++++------ .../Options/Sections/Online/PrivacyOptions.cs | 4 ++-- .../Overlays/Options/Sections/SkinSection.cs | 12 ++++++------ osu.Game/Screens/OsuGameScreen.cs | 3 ++- osu.Game/Screens/Play/Player.cs | 2 +- osu.Game/Screens/Play/PlayerInputManager.cs | 2 +- 31 files changed, 94 insertions(+), 93 deletions(-) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs index e75441c812..7f7d558294 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBody.cs @@ -79,8 +79,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - snakingIn = config.GetWeldedBindable(OsuConfig.SnakingInSliders); - snakingOut = config.GetWeldedBindable(OsuConfig.SnakingOutSliders); + snakingIn = config.GetBindable(OsuConfig.SnakingInSliders); + snakingOut = config.GetBindable(OsuConfig.SnakingOutSliders); int textureWidth = (int)PathWidth * 2; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 8c9e135d49..8681259272 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -79,7 +79,7 @@ namespace osu.Game.Beatmaps.Drawables { this.config = config; - preferUnicode = config.GetWeldedBindable(OsuConfig.ShowUnicode); + preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); preferUnicode.ValueChanged += preferUnicode_changed; preferUnicode_changed(preferUnicode, null); } diff --git a/osu.Game/Graphics/Containers/ParallaxContainer.cs b/osu.Game/Graphics/Containers/ParallaxContainer.cs index f180100fb0..1908bd0aa2 100644 --- a/osu.Game/Graphics/Containers/ParallaxContainer.cs +++ b/osu.Game/Graphics/Containers/ParallaxContainer.cs @@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers private void load(UserInputManager input, OsuConfigManager config) { this.input = input; - parallaxEnabled = config.GetWeldedBindable(OsuConfig.MenuParallax); + parallaxEnabled = config.GetBindable(OsuConfig.MenuParallax); parallaxEnabled.ValueChanged += delegate { if (!parallaxEnabled) diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 07caa2055e..b8784cef6d 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -54,7 +54,7 @@ namespace osu.Game.Graphics.Cursor [BackgroundDependencyLoader] private void load(TextureStore textures, OsuConfigManager config) { - cursorScale = config.GetWeldedBindable(OsuConfig.CursorSize); + cursorScale = config.GetBindable(OsuConfig.CursorSize); Children = new Drawable[] { diff --git a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs index 4ae3ae6e50..07a8017294 100644 --- a/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs +++ b/osu.Game/Graphics/UserInterface/Volume/VolumeControl.cs @@ -82,9 +82,9 @@ namespace osu.Game.Graphics.UserInterface.Volume [BackgroundDependencyLoader] private void load(AudioManager audio) { - volumeMeterMaster.Bindable.Weld(audio.Volume); - volumeMeterEffect.Bindable.Weld(audio.VolumeSample); - volumeMeterMusic.Bindable.Weld(audio.VolumeTrack); + volumeMeterMaster.Bindable.BindTo(audio.Volume); + volumeMeterEffect.Bindable.BindTo(audio.VolumeSample); + volumeMeterMusic.Bindable.BindTo(audio.VolumeTrack); } ScheduledDelegate popOutDelegate; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index daa4f38c15..b8a8fe0618 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -87,7 +87,7 @@ namespace osu.Game Dependencies.Cache(this); - PlayMode = LocalConfig.GetWeldedBindable(OsuConfig.PlayMode); + PlayMode = LocalConfig.GetBindable(OsuConfig.PlayMode); } protected async void ImportBeatmapsAsync(IEnumerable paths) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index c39856f3b6..661cbe06a4 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -211,7 +211,7 @@ namespace osu.Game.Overlays this.beatmaps = beatmaps; trackManager = osuGame.Audio.Track; - preferUnicode = config.GetWeldedBindable(OsuConfig.ShowUnicode); + preferUnicode = config.GetBindable(OsuConfig.ShowUnicode); preferUnicode.ValueChanged += preferUnicode_changed; beatmapSource = osuGame.Beatmap ?? new Bindable(); diff --git a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs index 83072d7c97..2602565c29 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/OffsetOptions.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio new OptionSlider { LabelText = "Universal Offset", - Bindable = (BindableInt)config.GetWeldedBindable(OsuConfig.Offset) + Bindable = (BindableInt)config.GetBindable(OsuConfig.Offset) }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs index 510a02a40d..d8e8964b17 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs @@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio new OsuCheckbox { LabelText = "Ignore beatmap hitsounds", - Bindable = config.GetWeldedBindable(OsuConfig.IgnoreBeatmapSamples) + Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSamples) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs index 26b3023f47..2f04bfe88b 100644 --- a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs @@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug new OptionEnumDropDown { LabelText = "Active mode", - Bindable = config.GetWeldedBindable(FrameworkDebugConfig.ActiveGCMode) + Bindable = config.GetBindable(FrameworkDebugConfig.ActiveGCMode) }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs index b81a248901..513d89c601 100644 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ b/osu.Game/Overlays/Options/Sections/EditorSection.cs @@ -24,32 +24,32 @@ namespace osu.Game.Overlays.Options.Sections new OsuCheckbox { LabelText = "Background video", - Bindable = config.GetWeldedBindable(OsuConfig.VideoEditor) + Bindable = config.GetBindable(OsuConfig.VideoEditor) }, new OsuCheckbox { LabelText = "Always use default skin", - Bindable = config.GetWeldedBindable(OsuConfig.EditorDefaultSkin) + Bindable = config.GetBindable(OsuConfig.EditorDefaultSkin) }, new OsuCheckbox { LabelText = "Snaking sliders", - Bindable = config.GetWeldedBindable(OsuConfig.EditorSnakingSliders) + Bindable = config.GetBindable(OsuConfig.EditorSnakingSliders) }, new OsuCheckbox { LabelText = "Hit animations", - Bindable = config.GetWeldedBindable(OsuConfig.EditorHitAnimations) + Bindable = config.GetBindable(OsuConfig.EditorHitAnimations) }, new OsuCheckbox { LabelText = "Follow points", - Bindable = config.GetWeldedBindable(OsuConfig.EditorFollowPoints) + Bindable = config.GetBindable(OsuConfig.EditorFollowPoints) }, new OsuCheckbox { LabelText = "Stacking", - Bindable = config.GetWeldedBindable(OsuConfig.EditorStacking) + Bindable = config.GetBindable(OsuConfig.EditorStacking) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs index 505e8efc5b..1c28f6247d 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs @@ -21,42 +21,42 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay new OptionSlider { LabelText = "Background dim", - Bindable = (BindableInt)config.GetWeldedBindable(OsuConfig.DimLevel) + Bindable = (BindableInt)config.GetBindable(OsuConfig.DimLevel) }, new OptionEnumDropDown { LabelText = "Progress display", - Bindable = config.GetWeldedBindable(OsuConfig.ProgressBarType) + Bindable = config.GetBindable(OsuConfig.ProgressBarType) }, new OptionEnumDropDown { LabelText = "Score meter type", - Bindable = config.GetWeldedBindable(OsuConfig.ScoreMeter) + Bindable = config.GetBindable(OsuConfig.ScoreMeter) }, new OptionSlider { LabelText = "Score meter size", - Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.ScoreMeterScale) + Bindable = (BindableDouble)config.GetBindable(OsuConfig.ScoreMeterScale) }, new OsuCheckbox { LabelText = "Always show key overlay", - Bindable = config.GetWeldedBindable(OsuConfig.KeyOverlay) + Bindable = config.GetBindable(OsuConfig.KeyOverlay) }, new OsuCheckbox { LabelText = "Show approach circle on first \"Hidden\" object", - Bindable = config.GetWeldedBindable(OsuConfig.HiddenShowFirstApproach) + Bindable = config.GetBindable(OsuConfig.HiddenShowFirstApproach) }, new OsuCheckbox { LabelText = "Scale osu!mania scroll speed with BPM", - Bindable = config.GetWeldedBindable(OsuConfig.ManiaSpeedBPMScale) + Bindable = config.GetBindable(OsuConfig.ManiaSpeedBPMScale) }, new OsuCheckbox { LabelText = "Remember osu!mania scroll speed per beatmap", - Bindable = config.GetWeldedBindable(OsuConfig.UsePerBeatmapManiaSpeed) + Bindable = config.GetBindable(OsuConfig.UsePerBeatmapManiaSpeed) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs index d78916b223..be38a9847a 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/SongSelectOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay new OptionSlider { LabelText = "Display beatmaps from", - Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.DisplayStarsMinimum) + Bindable = (BindableDouble)config.GetBindable(OsuConfig.DisplayStarsMinimum) }, new OptionSlider { LabelText = "up to", - Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.DisplayStarsMaximum) + Bindable = (BindableDouble)config.GetBindable(OsuConfig.DisplayStarsMaximum) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs index c45395ad68..dc29b56f44 100644 --- a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs @@ -21,12 +21,12 @@ namespace osu.Game.Overlays.Options.Sections.General new OsuCheckbox { LabelText = "Prefer metadata in original language", - Bindable = config.GetWeldedBindable(OsuConfig.ShowUnicode) + Bindable = config.GetBindable(OsuConfig.ShowUnicode) }, new OsuCheckbox { LabelText = "Use alternative font for chat display", - Bindable = config.GetWeldedBindable(OsuConfig.AlternativeChatFont) + Bindable = config.GetBindable(OsuConfig.AlternativeChatFont) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 16f316c25e..34f42aac43 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -122,12 +122,12 @@ namespace osu.Game.Overlays.Options.Sections.General new OsuCheckbox { LabelText = "Remember username", - Bindable = config.GetWeldedBindable(OsuConfig.SaveUsername), + Bindable = config.GetBindable(OsuConfig.SaveUsername), }, new OsuCheckbox { LabelText = "Stay logged in", - Bindable = config.GetWeldedBindable(OsuConfig.SavePassword), + Bindable = config.GetBindable(OsuConfig.SavePassword), }, new OsuButton { diff --git a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs index 74feb73462..c45dc9cbd4 100644 --- a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.General new OptionEnumDropDown { LabelText = "Release stream", - Bindable = config.GetWeldedBindable(OsuConfig.ReleaseStream), + Bindable = config.GetBindable(OsuConfig.ReleaseStream), }, new OptionLabel { Text = "Your osu! is up to date" }, // TODO: map this to reality new OsuButton diff --git a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs index d9649cdf65..e66d097094 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs @@ -20,47 +20,47 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Snaking in sliders", - Bindable = config.GetWeldedBindable(OsuConfig.SnakingInSliders) + Bindable = config.GetBindable(OsuConfig.SnakingInSliders) }, new OsuCheckbox { LabelText = "Snaking out sliders", - Bindable = config.GetWeldedBindable(OsuConfig.SnakingOutSliders) + Bindable = config.GetBindable(OsuConfig.SnakingOutSliders) }, new OsuCheckbox { LabelText = "Background video", - Bindable = config.GetWeldedBindable(OsuConfig.Video) + Bindable = config.GetBindable(OsuConfig.Video) }, new OsuCheckbox { LabelText = "Storyboards", - Bindable = config.GetWeldedBindable(OsuConfig.ShowStoryboard) + Bindable = config.GetBindable(OsuConfig.ShowStoryboard) }, new OsuCheckbox { LabelText = "Combo bursts", - Bindable = config.GetWeldedBindable(OsuConfig.ComboBurst) + Bindable = config.GetBindable(OsuConfig.ComboBurst) }, new OsuCheckbox { LabelText = "Hit lighting", - Bindable = config.GetWeldedBindable(OsuConfig.HitLighting) + Bindable = config.GetBindable(OsuConfig.HitLighting) }, new OsuCheckbox { LabelText = "Shaders", - Bindable = config.GetWeldedBindable(OsuConfig.Bloom) + Bindable = config.GetBindable(OsuConfig.Bloom) }, new OsuCheckbox { LabelText = "Softening filter", - Bindable = config.GetWeldedBindable(OsuConfig.BloomSoftening) + Bindable = config.GetBindable(OsuConfig.BloomSoftening) }, new OptionEnumDropDown { LabelText = "Screenshot", - Bindable = config.GetWeldedBindable(OsuConfig.ScreenshotFormat) + Bindable = config.GetBindable(OsuConfig.ScreenshotFormat) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index 66dbb3c75e..a3dbb9c76f 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -21,22 +21,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OptionEnumDropDown { LabelText = "Screen mode", - Bindable = config.GetWeldedBindable(FrameworkConfig.WindowMode), + Bindable = config.GetBindable(FrameworkConfig.WindowMode), }, new OsuCheckbox { LabelText = "Letterboxing", - Bindable = config.GetWeldedBindable(FrameworkConfig.Letterboxing), + Bindable = config.GetBindable(FrameworkConfig.Letterboxing), }, new OptionSlider { LabelText = "Horizontal position", - Bindable = (BindableInt)config.GetWeldedBindable(FrameworkConfig.LetterboxPositionX) + Bindable = (BindableInt)config.GetBindable(FrameworkConfig.LetterboxPositionX) }, new OptionSlider { LabelText = "Vertical position", - Bindable = (BindableInt)config.GetWeldedBindable(FrameworkConfig.LetterboxPositionY) + Bindable = (BindableInt)config.GetBindable(FrameworkConfig.LetterboxPositionY) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs index 6520dfc394..c5000d8547 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs @@ -19,27 +19,27 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Snow", - Bindable = config.GetWeldedBindable(OsuConfig.MenuSnow) + Bindable = config.GetBindable(OsuConfig.MenuSnow) }, new OsuCheckbox { LabelText = "Parallax", - Bindable = config.GetWeldedBindable(OsuConfig.MenuParallax) + Bindable = config.GetBindable(OsuConfig.MenuParallax) }, new OsuCheckbox { LabelText = "Menu tips", - Bindable = config.GetWeldedBindable(OsuConfig.ShowMenuTips) + Bindable = config.GetBindable(OsuConfig.ShowMenuTips) }, new OsuCheckbox { LabelText = "Interface voices", - Bindable = config.GetWeldedBindable(OsuConfig.MenuVoice) + Bindable = config.GetBindable(OsuConfig.MenuVoice) }, new OsuCheckbox { LabelText = "osu! music theme", - Bindable = config.GetWeldedBindable(OsuConfig.MenuMusic) + Bindable = config.GetBindable(OsuConfig.MenuMusic) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs index f478d40a3f..b98337f1e6 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs @@ -23,22 +23,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OptionEnumDropDown { LabelText = "Frame limiter", - Bindable = config.GetWeldedBindable(FrameworkConfig.FrameSync) + Bindable = config.GetBindable(FrameworkConfig.FrameSync) }, new OsuCheckbox { LabelText = "Show FPS counter", - Bindable = osuConfig.GetWeldedBindable(OsuConfig.FpsCounter), + Bindable = osuConfig.GetBindable(OsuConfig.FpsCounter), }, new OsuCheckbox { LabelText = "Reduce dropped frames", - Bindable = osuConfig.GetWeldedBindable(OsuConfig.ForceFrameFlush), + Bindable = osuConfig.GetBindable(OsuConfig.ForceFrameFlush), }, new OsuCheckbox { LabelText = "Detect performance issues", - Bindable = osuConfig.GetWeldedBindable(OsuConfig.DetectPerformanceIssues), + Bindable = osuConfig.GetBindable(OsuConfig.DetectPerformanceIssues), }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs index 083606f141..d4855a1619 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics new OsuCheckbox { LabelText = "Show thumbnails", - Bindable = config.GetWeldedBindable(OsuConfig.SongSelectThumbnails) + Bindable = config.GetBindable(OsuConfig.SongSelectThumbnails) } }; } diff --git a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs index 4a6d1fb79e..ef1dd755b7 100644 --- a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs @@ -21,37 +21,37 @@ namespace osu.Game.Overlays.Options.Sections.Input new OptionSlider { LabelText = "Sensitivity", - Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.MouseSpeed), + Bindable = (BindableDouble)config.GetBindable(OsuConfig.MouseSpeed), }, new OsuCheckbox { LabelText = "Raw input", - Bindable = config.GetWeldedBindable(OsuConfig.RawInput) + Bindable = config.GetBindable(OsuConfig.RawInput) }, new OsuCheckbox { LabelText = "Map absolute raw input to the osu! window", - Bindable = config.GetWeldedBindable(OsuConfig.AbsoluteToOsuWindow) + Bindable = config.GetBindable(OsuConfig.AbsoluteToOsuWindow) }, new OptionEnumDropDown { LabelText = "Confine mouse cursor", - Bindable = config.GetWeldedBindable(OsuConfig.ConfineMouse), + Bindable = config.GetBindable(OsuConfig.ConfineMouse), }, new OsuCheckbox { LabelText = "Disable mouse wheel in play mode", - Bindable = config.GetWeldedBindable(OsuConfig.MouseDisableWheel) + Bindable = config.GetBindable(OsuConfig.MouseDisableWheel) }, new OsuCheckbox { LabelText = "Disable mouse buttons in play mode", - Bindable = config.GetWeldedBindable(OsuConfig.MouseDisableButtons) + Bindable = config.GetBindable(OsuConfig.MouseDisableButtons) }, new OsuCheckbox { LabelText = "Cursor ripples", - Bindable = config.GetWeldedBindable(OsuConfig.CursorRipple) + Bindable = config.GetBindable(OsuConfig.CursorRipple) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs b/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs index dd3e0f81f9..9323f7514b 100644 --- a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Input new OsuCheckbox { LabelText = "OS TabletPC support", - Bindable = config.GetWeldedBindable(OsuConfig.Tablet) + Bindable = config.GetBindable(OsuConfig.Tablet) }, new OsuCheckbox { LabelText = "Wiimote/TaTaCon Drum Support", - Bindable = config.GetWeldedBindable(OsuConfig.Wiimote) + Bindable = config.GetBindable(OsuConfig.Wiimote) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs index 7d240aa97d..9a477f40c7 100644 --- a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs @@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Filter offensive words", - Bindable = config.GetWeldedBindable(OsuConfig.ChatFilter) + Bindable = config.GetBindable(OsuConfig.ChatFilter) }, new OsuCheckbox { LabelText = "Filter foreign characters", - Bindable = config.GetWeldedBindable(OsuConfig.ChatRemoveForeign) + Bindable = config.GetBindable(OsuConfig.ChatRemoveForeign) }, new OsuCheckbox { LabelText = "Log private messages", - Bindable = config.GetWeldedBindable(OsuConfig.LogPrivateMessages) + Bindable = config.GetBindable(OsuConfig.LogPrivateMessages) }, new OsuCheckbox { LabelText = "Block private messages from non-friends", - Bindable = config.GetWeldedBindable(OsuConfig.BlockNonFriendPM) + Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) }, new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, new OptionTextBox { RelativeSizeAxes = Axes.X, - Bindable = config.GetWeldedBindable(OsuConfig.IgnoreList) + Bindable = config.GetBindable(OsuConfig.IgnoreList) }, new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, new OptionTextBox { RelativeSizeAxes = Axes.X, - Bindable = config.GetWeldedBindable(OsuConfig.HighlightWords) + Bindable = config.GetBindable(OsuConfig.HighlightWords) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs b/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs index d8c3715fb9..d4298ee43c 100644 --- a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs @@ -20,22 +20,22 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Integrate with Yahoo! status display", - Bindable = config.GetWeldedBindable(OsuConfig.YahooIntegration) + Bindable = config.GetBindable(OsuConfig.YahooIntegration) }, new OsuCheckbox { LabelText = "Integrate with MSN Live status display", - Bindable = config.GetWeldedBindable(OsuConfig.MsnIntegration) + Bindable = config.GetBindable(OsuConfig.MsnIntegration) }, new OsuCheckbox { LabelText = "Automatically start osu!direct downloads", - Bindable = config.GetWeldedBindable(OsuConfig.AutomaticDownload) + Bindable = config.GetBindable(OsuConfig.AutomaticDownload) }, new OsuCheckbox { LabelText = "Prefer no-video downloads", - Bindable = config.GetWeldedBindable(OsuConfig.AutomaticDownloadNoVideo) + Bindable = config.GetBindable(OsuConfig.AutomaticDownloadNoVideo) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs b/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs index 39ae381e5d..4614210e9f 100644 --- a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs @@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Enable chat ticker", - Bindable = config.GetWeldedBindable(OsuConfig.Ticker) + Bindable = config.GetBindable(OsuConfig.Ticker) }, new OsuCheckbox { LabelText = "Show a notification popup when someone says your name", - Bindable = config.GetWeldedBindable(OsuConfig.ChatHighlightName) + Bindable = config.GetBindable(OsuConfig.ChatHighlightName) }, new OsuCheckbox { LabelText = "Show chat message notifications", - Bindable = config.GetWeldedBindable(OsuConfig.ChatMessageNotification) + Bindable = config.GetBindable(OsuConfig.ChatMessageNotification) }, new OsuCheckbox { LabelText = "Play a sound when someone says your name", - Bindable = config.GetWeldedBindable(OsuConfig.ChatAudibleHighlight) + Bindable = config.GetBindable(OsuConfig.ChatAudibleHighlight) }, new OsuCheckbox { LabelText = "Show notification popups instantly during gameplay", - Bindable = config.GetWeldedBindable(OsuConfig.PopupDuringGameplay) + Bindable = config.GetBindable(OsuConfig.PopupDuringGameplay) }, new OsuCheckbox { LabelText = "Show notification popups when friends change status", - Bindable = config.GetWeldedBindable(OsuConfig.NotifyFriends) + Bindable = config.GetBindable(OsuConfig.NotifyFriends) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs b/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs index a79bc4f542..fb2adbb2ac 100644 --- a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs @@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Online new OsuCheckbox { LabelText = "Share your city location with others", - Bindable = config.GetWeldedBindable(OsuConfig.DisplayCityLocation) + Bindable = config.GetBindable(OsuConfig.DisplayCityLocation) }, new OsuCheckbox { LabelText = "Allow multiplayer game invites from all users", - Bindable = config.GetWeldedBindable(OsuConfig.AllowPublicInvites) + Bindable = config.GetBindable(OsuConfig.AllowPublicInvites) }, }; } diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index f7968b8f66..56dd9ca318 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -42,32 +42,32 @@ namespace osu.Game.Overlays.Options.Sections new OsuCheckbox { LabelText = "Ignore all beatmap skins", - Bindable = config.GetWeldedBindable(OsuConfig.IgnoreBeatmapSkins) + Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSkins) }, new OsuCheckbox { LabelText = "Use skin's sound samples", - Bindable = config.GetWeldedBindable(OsuConfig.SkinSamples) + Bindable = config.GetBindable(OsuConfig.SkinSamples) }, new OsuCheckbox { LabelText = "Use Taiko skin for Taiko mode", - Bindable = config.GetWeldedBindable(OsuConfig.UseTaikoSkin) + Bindable = config.GetBindable(OsuConfig.UseTaikoSkin) }, new OsuCheckbox { LabelText = "Always use skin cursor", - Bindable = config.GetWeldedBindable(OsuConfig.UseSkinCursor) + Bindable = config.GetBindable(OsuConfig.UseSkinCursor) }, new OptionSlider { LabelText = "Cursor size", - Bindable = (BindableDouble)config.GetWeldedBindable(OsuConfig.CursorSize) + Bindable = (BindableDouble)config.GetBindable(OsuConfig.CursorSize) }, new OsuCheckbox { LabelText = "Automatic cursor size", - Bindable = config.GetWeldedBindable(OsuConfig.AutomaticCursorSizing) + Bindable = config.GetBindable(OsuConfig.AutomaticCursorSizing) }, }; } diff --git a/osu.Game/Screens/OsuGameScreen.cs b/osu.Game/Screens/OsuGameScreen.cs index 70bf70ad1d..519d1f8aa9 100644 --- a/osu.Game/Screens/OsuGameScreen.cs +++ b/osu.Game/Screens/OsuGameScreen.cs @@ -46,7 +46,8 @@ namespace osu.Game.Screens [BackgroundDependencyLoader(permitNulls: true)] private void load(OsuGameBase game) { - beatmap.Weld(game?.Beatmap); + if (game != null) + beatmap.BindTo(game.Beatmap); beatmap.ValueChanged += beatmap_ValueChanged; } diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index b94a130bdc..b552601458 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -71,7 +71,7 @@ namespace osu.Game.Screens.Play [BackgroundDependencyLoader] private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config) { - dimLevel = config.GetWeldedBindable(OsuConfig.DimLevel); + dimLevel = config.GetBindable(OsuConfig.DimLevel); try { if (Beatmap == null) diff --git a/osu.Game/Screens/Play/PlayerInputManager.cs b/osu.Game/Screens/Play/PlayerInputManager.cs index 3bafc3935a..181cd68da9 100644 --- a/osu.Game/Screens/Play/PlayerInputManager.cs +++ b/osu.Game/Screens/Play/PlayerInputManager.cs @@ -25,7 +25,7 @@ namespace osu.Game.Screens.Play [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - mouseDisabled = config.GetWeldedBindable(OsuConfig.MouseDisableButtons) + mouseDisabled = config.GetBindable(OsuConfig.MouseDisableButtons) ?? new Bindable(false); } From 7c602a2af3181f5b7651f9229d7a93ef664c63bd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 15:55:34 +0900 Subject: [PATCH 05/27] Update framework. --- osu-framework | 2 +- osu.Game/Modes/UI/ScoreOverlay.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu-framework b/osu-framework index 12fbf2b94a..b061324151 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 12fbf2b94af0ddef9daf0fab11c05288dee054a7 +Subproject commit b0613241512e46eed9dc16ae08ed4064d2db4101 diff --git a/osu.Game/Modes/UI/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs index 7be6af5c6a..e43009adda 100644 --- a/osu.Game/Modes/UI/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -64,7 +64,7 @@ namespace osu.Game.Modes.UI processor.TotalScore.ValueChanged += delegate { ScoreCounter?.Set((ulong)processor.TotalScore.Value); }; processor.Accuracy.ValueChanged += delegate { AccuracyCounter?.Set((float)processor.Accuracy.Value); }; processor.Combo.ValueChanged += delegate { ComboCounter?.Set((ulong)processor.Combo.Value); }; - HealthDisplay?.Current.Weld(processor.Health); + HealthDisplay?.Current.BindTo(processor.Health); } } } diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 7856d0b031..4a28369297 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -27,7 +27,7 @@ namespace osu.Game.Screens.Select { private static readonly Vector2 wedged_container_shear = new Vector2(0.15f, 0); - private Container beatmapInfoContainer; + private BufferedContainer beatmapInfoContainer; private OsuGameBase game; From 68dd3c02aaeaea40f375b3a3f6cdacb8f9c8711f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 16:37:49 +0900 Subject: [PATCH 06/27] Fix failing testcase (nullref). --- osu.Game/Screens/Play/PlayerLoader.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 65beee6cac..c5c9e6722f 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transforms; using osu.Framework.Screens; using osu.Game.Beatmaps; +using osu.Game.Database; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Screens.Backgrounds; @@ -125,6 +126,8 @@ namespace osu.Game.Screens.Play public BeatmapMetadataDisplay(WorkingBeatmap beatmap) { + var metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata(); + AutoSizeAxes = Axes.Both; Children = new Drawable[] { @@ -138,7 +141,7 @@ namespace osu.Game.Screens.Play { new OsuSpriteText { - Text = beatmap.BeatmapInfo.Metadata.Title, + Text = metadata.Title, TextSize = 36, Font = @"Exo2.0-MediumItalic", Origin = Anchor.TopCentre, @@ -146,7 +149,7 @@ namespace osu.Game.Screens.Play }, new OsuSpriteText { - Text = beatmap.BeatmapInfo.Metadata.Artist, + Text = metadata.Artist, TextSize = 26, Font = @"Exo2.0-MediumItalic", Origin = Anchor.TopCentre, @@ -173,7 +176,7 @@ namespace osu.Game.Screens.Play }, new OsuSpriteText { - Text = beatmap.BeatmapInfo.Version, + Text = beatmap.BeatmapInfo?.Version, TextSize = 26, Font = @"Exo2.0-MediumItalic", Origin = Anchor.TopCentre, @@ -183,7 +186,7 @@ namespace osu.Game.Screens.Play Bottom = 40 }, }, - new MetadataLine("Source", beatmap.BeatmapInfo.Metadata.Source) + new MetadataLine("Source", metadata.Source) { Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, @@ -193,7 +196,7 @@ namespace osu.Game.Screens.Play Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, - new MetadataLine("Mapper", beatmap.BeatmapInfo.Metadata.Author) + new MetadataLine("Mapper", metadata.Author) { Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, From 4da09713a9b6edbbd7768589b35f021136c464ee Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:08:05 +0900 Subject: [PATCH 07/27] Fix test case regression. --- osu.Game/Screens/OsuGameScreen.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Screens/OsuGameScreen.cs b/osu.Game/Screens/OsuGameScreen.cs index 519d1f8aa9..871d3a6780 100644 --- a/osu.Game/Screens/OsuGameScreen.cs +++ b/osu.Game/Screens/OsuGameScreen.cs @@ -47,7 +47,14 @@ namespace osu.Game.Screens private void load(OsuGameBase game) { if (game != null) + { + //if we were given a beatmap at ctor time, we want to pass this on to the game-wide beatmap. + var localMap = beatmap.Value; beatmap.BindTo(game.Beatmap); + if (localMap != null) + beatmap.Value = localMap; + } + beatmap.ValueChanged += beatmap_ValueChanged; } From 4a4f1f4d82f872f586e97b09e7f07dd6ed4a7eea Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:26:51 +0900 Subject: [PATCH 08/27] Actually delete all related database entries, not just the set. --- osu.Game/Database/BeatmapDatabase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..fc2c7558b0 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -57,6 +57,18 @@ namespace osu.Game.Database try { storage.Delete(b.Path); + + GetChildren(b, true); + + foreach (var i in b.Beatmaps) + { + if (i.Metadata != null) connection.Delete(i.Metadata); + if (i.BaseDifficulty != null) connection.Delete(i.BaseDifficulty); + + connection.Delete(i); + } + + if (b.Metadata != null) connection.Delete(b.Metadata); connection.Delete(b); } catch (Exception e) From 21c6f66017b6ba1994d7cb1ea42197cc0cf8e35b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:30:10 +0900 Subject: [PATCH 09/27] Fix TestCaseGamefield. --- .../Tests/TestCaseGamefield.cs | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index 9259f2ea78..dd957ee5a0 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using osu.Framework.Screens.Testing; using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; using osu.Framework.Timing; using osu.Game.Beatmaps; @@ -27,9 +28,6 @@ namespace osu.Desktop.VisualTests.Tests { base.Reset(); - //ensure we are at offset 0 - Clock = new FramedClock(); - List objects = new List(); int time = 500; @@ -52,33 +50,42 @@ namespace osu.Desktop.VisualTests.Tests Add(new Drawable[] { - new OsuHitRenderer + new Container { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.TopLeft, - Origin = Anchor.TopLeft - }, - new TaikoHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight - }, - new CatchHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft - }, - new ManiaHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.BottomRight, - Origin = Anchor.BottomRight + RelativeSizeAxes = Axes.Both, + //ensure we are at offset 0 + Clock = new FramedClock(), + Children = new Drawable[] + { + new OsuHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.TopLeft, + Origin = Anchor.TopLeft + }, + new TaikoHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight + }, + new CatchHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft + }, + new ManiaHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.BottomRight, + Origin = Anchor.BottomRight + } + } } }); } From 777f673a4639cf5bdbab07a984ad072794ff4536 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 19:48:48 +0900 Subject: [PATCH 10/27] Fix more test regressions. --- osu.Game/Beatmaps/Drawables/BeatmapGroup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs index 36c042ac30..bcdb1c0b5d 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapGroup.cs @@ -64,7 +64,7 @@ namespace osu.Game.Beatmaps.Drawables BeatmapSet = beatmapSet; WorkingBeatmap beatmap = database.GetWorkingBeatmap(BeatmapSet.Beatmaps.FirstOrDefault()); foreach (var b in BeatmapSet.Beatmaps) - b.StarDifficulty = (float)database.GetWorkingBeatmap(b).Beatmap.CalculateStarDifficulty(); + b.StarDifficulty = (float)(database.GetWorkingBeatmap(b).Beatmap?.CalculateStarDifficulty() ?? 0); Header = new BeatmapSetHeader(beatmap) { From a22216d0b0c7fe73dd2164c96c7d0b0f69160fbd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 20:38:30 +0900 Subject: [PATCH 11/27] Update nuget packages. --- osu.Desktop.Deploy/App.config | 4 +++ osu.Desktop.Deploy/osu.Desktop.Deploy.csproj | 32 ++++++++--------- osu.Desktop.Deploy/packages.config | 6 ++-- osu.Desktop.Tests/osu.Desktop.Tests.csproj | 2 +- .../osu.Desktop.VisualTests.csproj | 9 +++-- osu.Desktop.VisualTests/packages.config | 2 +- osu.Desktop/app.config | 4 +++ osu.Desktop/osu.Desktop.csproj | 34 +++++++++---------- osu.Desktop/packages.config | 6 ++-- .../osu.Game.Modes.Catch.csproj | 2 +- osu.Game.Modes.Catch/packages.config | 2 +- .../osu.Game.Modes.Mania.csproj | 2 +- osu.Game.Modes.Mania/packages.config | 2 +- osu.Game.Modes.Osu/app.config | 8 ++--- osu.Game.Modes.Osu/osu.Game.Modes.Osu.csproj | 2 +- osu.Game.Modes.Osu/packages.config | 2 +- .../osu.Game.Modes.Taiko.csproj | 2 +- osu.Game.Modes.Taiko/packages.config | 2 +- osu.Game.Tests/osu.Game.Tests.csproj | 10 +++--- osu.Game.Tests/packages.config | 22 ++++++------ osu.Game/osu.Game.csproj | 10 +++--- osu.Game/packages.config | 2 +- 22 files changed, 89 insertions(+), 78 deletions(-) diff --git a/osu.Desktop.Deploy/App.config b/osu.Desktop.Deploy/App.config index 6272e396fb..33ae53313b 100644 --- a/osu.Desktop.Deploy/App.config +++ b/osu.Desktop.Deploy/App.config @@ -23,6 +23,10 @@ + + + + \ No newline at end of file diff --git a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj index 122c2ec0d6..898a991292 100644 --- a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj +++ b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj @@ -36,52 +36,52 @@ osu.Desktop.Deploy.Program - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll True - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll True - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Mdb.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Pdb.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Rocks.dll True - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll True - - ..\packages\Splat.1.6.2\lib\Net45\Splat.dll + + $(SolutionDir)\packages\Splat.2.0.0\lib\Net45\Splat.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll True diff --git a/osu.Desktop.Deploy/packages.config b/osu.Desktop.Deploy/packages.config index b7c4b9c3bb..4bbb763e27 100644 --- a/osu.Desktop.Deploy/packages.config +++ b/osu.Desktop.Deploy/packages.config @@ -1,9 +1,9 @@  - - + + - + \ No newline at end of file diff --git a/osu.Desktop.Tests/osu.Desktop.Tests.csproj b/osu.Desktop.Tests/osu.Desktop.Tests.csproj index 7a5bd59074..9037acb220 100644 --- a/osu.Desktop.Tests/osu.Desktop.Tests.csproj +++ b/osu.Desktop.Tests/osu.Desktop.Tests.csproj @@ -34,7 +34,7 @@ - ..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll True diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj index cd899d4dd2..c3234d7a96 100644 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj @@ -82,6 +82,10 @@ + + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll + True + False $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll @@ -99,9 +103,8 @@ $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll - + + diff --git a/osu.Desktop.VisualTests/packages.config b/osu.Desktop.VisualTests/packages.config index 82404c059e..3da209ee61 100644 --- a/osu.Desktop.VisualTests/packages.config +++ b/osu.Desktop.VisualTests/packages.config @@ -5,7 +5,7 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste --> - + diff --git a/osu.Desktop/app.config b/osu.Desktop/app.config index b9af3fdc80..b3c333c783 100644 --- a/osu.Desktop/app.config +++ b/osu.Desktop/app.config @@ -10,6 +10,10 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste + + + + \ No newline at end of file diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index d85671f5be..527a027ca2 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -89,61 +89,61 @@ Properties\app.manifest - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll True - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll True - - ..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Mdb.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Pdb.dll True - ..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Rocks.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll True - - ..\packages\Splat.1.6.2\lib\Net45\Splat.dll + + $(SolutionDir)\packages\Splat.2.0.0\lib\Net45\Splat.dll True - ..\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll + $(SolutionDir)\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll True - ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + $(SolutionDir)\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll True - ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + $(SolutionDir)\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll True diff --git a/osu.Desktop/packages.config b/osu.Desktop/packages.config index e203f3042a..bdeaf1de89 100644 --- a/osu.Desktop/packages.config +++ b/osu.Desktop/packages.config @@ -4,9 +4,9 @@ Copyright (c) 2007-2017 ppy Pty Ltd . Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE --> - + - - + + \ No newline at end of file diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index 5e3f0f1d96..6b37963da1 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -33,7 +33,7 @@ - ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll True diff --git a/osu.Game.Modes.Catch/packages.config b/osu.Game.Modes.Catch/packages.config index d53e65896a..4031dd62a8 100644 --- a/osu.Game.Modes.Catch/packages.config +++ b/osu.Game.Modes.Catch/packages.config @@ -4,5 +4,5 @@ Copyright (c) 2007-2017 ppy Pty Ltd . Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE --> - + \ No newline at end of file diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj index ecd3fe6423..b9b7e35ae7 100644 --- a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -33,7 +33,7 @@ - ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll True diff --git a/osu.Game.Modes.Mania/packages.config b/osu.Game.Modes.Mania/packages.config index d53e65896a..4031dd62a8 100644 --- a/osu.Game.Modes.Mania/packages.config +++ b/osu.Game.Modes.Mania/packages.config @@ -4,5 +4,5 @@ Copyright (c) 2007-2017 ppy Pty Ltd . Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE --> - + \ No newline at end of file diff --git a/osu.Game.Modes.Osu/app.config b/osu.Game.Modes.Osu/app.config index d9da887349..f77f36199c 100644 --- a/osu.Game.Modes.Osu/app.config +++ b/osu.Game.Modes.Osu/app.config @@ -1,4 +1,4 @@ - + - + \ No newline at end of file diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 6d09463d93..a964d48288 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -33,7 +33,7 @@ - ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll True diff --git a/osu.Game.Modes.Taiko/packages.config b/osu.Game.Modes.Taiko/packages.config index d53e65896a..4031dd62a8 100644 --- a/osu.Game.Modes.Taiko/packages.config +++ b/osu.Game.Modes.Taiko/packages.config @@ -4,5 +4,5 @@ Copyright (c) 2007-2017 ppy Pty Ltd . Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE --> - + \ No newline at end of file diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index f555615f09..009cafe59e 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -33,17 +33,15 @@ $(SolutionDir)\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll True + + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll + True + $(SolutionDir)\packages\NUnit.3.5.0\lib\nunit.framework.dll - - $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll - True - - - $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll diff --git a/osu.Game.Tests/packages.config b/osu.Game.Tests/packages.config index b9f1a2c8cd..c3be99dfd1 100644 --- a/osu.Game.Tests/packages.config +++ b/osu.Game.Tests/packages.config @@ -1,11 +1,11 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 8a8afd2fe0..ddad06a476 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -40,19 +40,19 @@ True - ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1340\lib\net45\OpenTK.dll True - ..\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll + $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll True - ..\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll + $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll True - ..\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll + $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll True @@ -63,6 +63,8 @@ $(SolutionDir)\packages\SQLiteNetExtensions.1.3.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\SQLiteNetExtensions.dll + + diff --git a/osu.Game/packages.config b/osu.Game/packages.config index 0249d173ac..15d28ca24f 100644 --- a/osu.Game/packages.config +++ b/osu.Game/packages.config @@ -6,7 +6,7 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste - + From afdb95f4d52c16299b90439744ee9321745fcb38 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 20:39:04 +0900 Subject: [PATCH 12/27] Fix even more test regressions. --- osu.Game/Beatmaps/Beatmap.cs | 4 ++-- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index d92e340e72..f195f8f2ba 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -18,8 +18,8 @@ namespace osu.Game.Beatmaps public List HitObjects { get; set; } public List ControlPoints { get; set; } public List ComboColors { get; set; } - public double BPMMaximum => 60000 / ControlPoints.Where(c => c.BeatLength != 0).OrderBy(c => c.BeatLength).First().BeatLength; - public double BPMMinimum => 60000 / ControlPoints.Where(c => c.BeatLength != 0).OrderByDescending(c => c.BeatLength).First().BeatLength; + public double BPMMaximum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderBy(c => c.BeatLength).FirstOrDefault() ?? ControlPoint.Default).BeatLength; + public double BPMMinimum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderByDescending(c => c.BeatLength).FirstOrDefault() ?? ControlPoint.Default).BeatLength; public double BPMMode => BPMAt(ControlPoints.Where(c => c.BeatLength != 0).GroupBy(c => c.BeatLength).OrderByDescending(grp => grp.Count()).First().First().Time); public double BPMAt(double time) diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 4a28369297..5043687d6e 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -63,6 +63,7 @@ namespace osu.Game.Screens.Select BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo; BeatmapInfo beatmapInfo = beatmap.BeatmapInfo; + BeatmapMetadata metadata = beatmap.BeatmapInfo?.Metadata ?? beatmap.BeatmapSetInfo?.Metadata ?? new BeatmapMetadata(); List labels = new List(); @@ -133,7 +134,7 @@ namespace osu.Game.Screens.Select new OsuSpriteText { Font = @"Exo2.0-MediumItalic", - Text = beatmapSetInfo.Metadata.Artist + " -- " + beatmapSetInfo.Metadata.Title, + Text = metadata.Artist + " -- " + metadata.Title, TextSize = 28, Shadow = true, }, @@ -161,7 +162,7 @@ namespace osu.Game.Screens.Select new OsuSpriteText { Font = @"Exo2.0-Bold", - Text = beatmapSetInfo.Metadata.Author, + Text = metadata.Author, TextSize = 15, Shadow = true, }, From e8b027130fec25f06fc00815fa424be620fd50ae Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 23:17:21 +0900 Subject: [PATCH 13/27] Remove unused variable. --- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 5043687d6e..4a3b9b7fcd 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -61,7 +61,6 @@ namespace osu.Game.Screens.Select float newDepth = lastContainer?.Depth + 1 ?? 0; - BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo; BeatmapInfo beatmapInfo = beatmap.BeatmapInfo; BeatmapMetadata metadata = beatmap.BeatmapInfo?.Metadata ?? beatmap.BeatmapSetInfo?.Metadata ?? new BeatmapMetadata(); From 3487dfe23672edd67e016e7c5f9273d7be65fa67 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:32:32 +0300 Subject: [PATCH 14/27] Removed unused variables and parameters --- osu.Desktop.VisualTests/Benchmark.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs | 2 +- osu.Game/Database/BeatmapDatabase.cs | 4 +--- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 -- osu.Game/Overlays/ChatOverlay.cs | 4 +--- osu.Game/Overlays/MusicController.cs | 3 +-- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/Notification.cs | 2 +- osu.Game/Overlays/Pause/QuitButton.cs | 2 +- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- 12 files changed, 11 insertions(+), 18 deletions(-) diff --git a/osu.Desktop.VisualTests/Benchmark.cs b/osu.Desktop.VisualTests/Benchmark.cs index 8c8cffaf3f..3847b6f00f 100644 --- a/osu.Desktop.VisualTests/Benchmark.cs +++ b/osu.Desktop.VisualTests/Benchmark.cs @@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests private double timePerTest = 200; [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Host.MaximumDrawHz = int.MaxValue; Host.MaximumUpdateHz = int.MaxValue; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs index 39f45273a9..5af2e7c197 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs @@ -16,7 +16,7 @@ namespace osu.Game.Beatmaps.Drawables } [BackgroundDependencyLoader] - private void load(OsuGameBase game) + private void load() { if (working.Background != null) Texture = working.Background; diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..310575de9e 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -25,14 +25,12 @@ namespace osu.Game.Database public event Action BeatmapSetAdded; public event Action BeatmapSetRemoved; - private BeatmapImporter ipc; - public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; if (importHost != null) - ipc = new BeatmapImporter(importHost, this); + new BeatmapImporter(importHost, this); if (connection == null) { diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 8011359db9..73626e03db 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -52,7 +52,7 @@ namespace osu.Game.Graphics.Cursor } [BackgroundDependencyLoader] - private void load(TextureStore textures, OsuConfigManager config) + private void load(OsuConfigManager config) { cursorScale = (BindableDouble)config.GetBindable(OsuConfig.CursorSize); diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index d2ca2e72f7..b9d1dca65d 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface { private readonly Container stars; - private double transformStartTime; - /// /// Maximum amount of stars displayed. /// diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index c3138cb571..ab5a255897 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -29,8 +29,6 @@ namespace osu.Game.Overlays { const float textbox_height = 40; - private DrawableChannel channelDisplay; - private ScheduledDelegate messageRequest; private Container content; @@ -126,7 +124,7 @@ namespace osu.Game.Overlays private void addChannel(Channel channel) { - Add(channelDisplay = new DrawableChannel(channel)); + Add(new DrawableChannel(channel)); careChannels.Add(channel); } diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 661cbe06a4..430654b8f5 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -75,8 +75,7 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, AudioManager audio, - TextureStore textures, OsuColour colours) + private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours) { game = osuGame; diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 7172559a94..77198a7fbe 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -25,7 +25,7 @@ namespace osu.Game.Overlays private FlowContainer sections; [BackgroundDependencyLoader(permitNulls: true)] - private void load(OsuColour colours) + private void load() { Width = width; RelativeSizeAxes = Axes.Y; diff --git a/osu.Game/Overlays/Notifications/Notification.cs b/osu.Game/Overlays/Notifications/Notification.cs index e3a1e55868..179e9bf066 100644 --- a/osu.Game/Overlays/Notifications/Notification.cs +++ b/osu.Game/Overlays/Notifications/Notification.cs @@ -256,7 +256,7 @@ namespace osu.Game.Overlays.Notifications } [BackgroundDependencyLoader] - private void load(OsuColour colours) + private void load() { Size = new Vector2(6, 15); diff --git a/osu.Game/Overlays/Pause/QuitButton.cs b/osu.Game/Overlays/Pause/QuitButton.cs index f1a9fd5e1d..dc99669111 100644 --- a/osu.Game/Overlays/Pause/QuitButton.cs +++ b/osu.Game/Overlays/Pause/QuitButton.cs @@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Pause public class QuitButton : PauseButton { [BackgroundDependencyLoader] - private void load(AudioManager audio, OsuColour colours) + private void load(AudioManager audio) { ButtonColour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly SampleHover = audio.Sample.Get(@"Menu/menuclick"); diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 005efb77a2..f411f74361 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -9,7 +9,7 @@ namespace osu.Game.Screens.Backgrounds public class BackgroundScreenDefault : BackgroundScreen { [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Add(new Background(@"Backgrounds/bg1")); } diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index dad7490c69..c4d1abd931 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -117,7 +117,7 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader(true)] - private void load(AudioManager audio, OsuGame game = null) + private void load(OsuGame game = null) { toolbar = game?.Toolbar; } From 9444ffd8497ac03b866c18d921a456737683cb15 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:37:38 +0300 Subject: [PATCH 15/27] Removed redundant qualifiers --- osu.Desktop/Overlays/VersionManager.cs | 2 +- osu.Game/OsuGame.cs | 2 +- osu.Game/Overlays/Options/OptionDropDown.cs | 2 +- osu.Game/Overlays/Options/OptionTextBox.cs | 2 +- osu.Game/Overlays/Options/Sections/GameplaySection.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index bdc8bc7e1a..af4a0de73c 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -37,7 +37,7 @@ namespace osu.Desktop.Overlays [BackgroundDependencyLoader] private void load(NotificationManager notification, OsuColour colours, TextureStore textures) { - this.notificationManager = notification; + notificationManager = notification; AutoSizeAxes = Axes.Both; Anchor = Anchor.BottomCentre; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index b8a8fe0618..0fdbd31dc8 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -214,7 +214,7 @@ namespace osu.Game } } - return base.OnKeyDown(state, args); + return OnKeyDown(state, args); } public event Action ModeChanged; diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 2f88ab34ae..72a5160ba0 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Options { Margin = new MarginPadding { Top = 5 }, RelativeSizeAxes = Axes.X, - Items = this.Items, + Items = Items, } }; dropdown.ValueChanged += dropdown_ValueChanged; diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 813d372db6..47c81e6a7e 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options bindable = value; if (bindable != null) { - base.Text = bindable.Value; + Text = bindable.Value; bindable.ValueChanged += bindableValueChanged; } diff --git a/osu.Game/Overlays/Options/Sections/GameplaySection.cs b/osu.Game/Overlays/Options/Sections/GameplaySection.cs index 87de1fd249..85a180ccbc 100644 --- a/osu.Game/Overlays/Options/Sections/GameplaySection.cs +++ b/osu.Game/Overlays/Options/Sections/GameplaySection.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections public GameplaySection() { - base.Children = new Drawable[] + Children = new Drawable[] { new GeneralOptions(), new SongSelectOptions(), From e06b3ecf2db9aea99ad7b47e4a7111ecfe80fdc0 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 18:18:12 +0300 Subject: [PATCH 16/27] Input fix --- osu.Game/OsuGame.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 0fdbd31dc8..bfb506fd4f 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -214,7 +214,7 @@ namespace osu.Game } } - return OnKeyDown(state, args); + return false; } public event Action ModeChanged; From 8b3477820ffa3eed25566549381d8f241e5192b8 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Tue, 28 Feb 2017 00:08:34 +0100 Subject: [PATCH 17/27] Disable mousewheel while playing --- osu.Game/Configuration/OsuConfigManager.cs | 2 +- osu.Game/Screens/Play/Player.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index ccf53ed714..84116a1f70 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -27,6 +27,7 @@ namespace osu.Game.Configuration Set(OsuConfig.DimLevel, 30, 0, 100); Set(OsuConfig.MouseDisableButtons, false); + Set(OsuConfig.MouseDisableWheel, false); Set(OsuConfig.SnakingInSliders, true); Set(OsuConfig.SnakingOutSliders, false); @@ -99,7 +100,6 @@ namespace osu.Game.Configuration Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true; Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true; Set(OsuConfig.MenuTip, 0).Disabled = true; - Set(OsuConfig.MouseDisableWheel, false).Disabled = true; Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true; Set(OsuConfig.Offset, 0, -300, 300).Disabled = true; Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index b552601458..9ad10c298c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -24,6 +24,7 @@ using OpenTK.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transforms; using osu.Framework.Logging; +using osu.Framework.Input; namespace osu.Game.Screens.Play { @@ -159,6 +160,8 @@ namespace osu.Game.Screens.Play scoreOverlay, pauseOverlay }; + + mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); } private void initializeSkipButton() @@ -325,5 +328,9 @@ namespace osu.Game.Screens.Play { Background?.FadeTo((100f - dimLevel) / 100, 800); } + + private Bindable mouseWheelDisabled; + + protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !isPaused; } } \ No newline at end of file From aa9582c0fa6a5d07dc6c345ae859e68520203fa8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 28 Feb 2017 11:28:12 +0900 Subject: [PATCH 18/27] Add exponential fall-off of triangles' alpha values. --- osu.Game/Graphics/Backgrounds/Triangles.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 219af9bd38..1eac06d472 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -10,6 +10,7 @@ using osu.Framework.MathUtils; using OpenTK; using OpenTK.Graphics; using System; +using osu.Framework.Graphics.Colour; namespace osu.Game.Graphics.Backgrounds { @@ -37,6 +38,12 @@ namespace osu.Game.Graphics.Backgrounds private float triangleScale = 1; + /// + /// Whether we should exponentially drop-off alpha values to improve the visual appearance of unbuffered fades. + /// This defaults to on as it is generally more aesthetically pleasing, but should be turned off in buffered contexts. + /// + public bool ExponentialAlphaAdjust = true; + public float TriangleScale { get { return triangleScale; } @@ -63,8 +70,11 @@ namespace osu.Game.Graphics.Backgrounds { base.Update(); + float adjustedAlpha = ExponentialAlphaAdjust ? (float)Math.Pow(((Color4)DrawInfo.Colour.Colour).A, 3) : 1; + foreach (var t in Children) { + t.Alpha = adjustedAlpha; t.Position -= new Vector2(0, (float)(t.Scale.X * (50 / DrawHeight) * (Time.Elapsed / 950)) / triangleScale); if (ExpireOffScreenTriangles && t.DrawPosition.Y + t.DrawSize.Y * t.Scale.Y < 0) t.Expire(); From 3208b3d8b4a9f919d2a64b49f34285bf359ef3e0 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 28 Feb 2017 11:37:08 +0800 Subject: [PATCH 19/27] EditorConfig naming style settings for vs2017. --- .editorconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.editorconfig b/.editorconfig index 759217430d..0dd7ef8ed1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,21 @@ insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true + +#Roslyn naming styles + +#PascalCase for public and protected members +dotnet_naming_style.pascalcase.capitalization = pascal_case +dotnet_naming_symbols.public_members.applicable_accessibilities = public,internal,protected,protected_internal +dotnet_naming_symbols.public_members.applicable_kinds = property,method,field,event,delegate +dotnet_naming_rule.public_members_pascalcase.severity = suggestion +dotnet_naming_rule.public_members_pascalcase.symbols = public_members +dotnet_naming_rule.public_members_pascalcase.style = pascalcase + +#camelCase for private members +dotnet_naming_style.camelcase.capitalization = camel_case +dotnet_naming_symbols.private_members.applicable_accessibilities = private +dotnet_naming_symbols.private_members.applicable_kinds = property,method,field,event,delegate +dotnet_naming_rule.private_members_camelcase.severity = suggestion +dotnet_naming_rule.private_members_camelcase.symbols = private_members +dotnet_naming_rule.private_members_camelcase.style = camelcase \ No newline at end of file From 654859a2a1f17fbadf99f9e9ee950bf7eb79bbe3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 28 Feb 2017 13:56:30 +0900 Subject: [PATCH 20/27] Restore potentially breaking change. --- osu.Game/Database/BeatmapDatabase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 5337c0faa5..fc2c7558b0 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -25,12 +25,14 @@ namespace osu.Game.Database public event Action BeatmapSetAdded; public event Action BeatmapSetRemoved; + private BeatmapImporter ipc; + public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; if (importHost != null) - new BeatmapImporter(importHost, this); + ipc = new BeatmapImporter(importHost, this); if (connection == null) { From 522034020e3de16d46aae9bff5753d6f7d9beb10 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Tue, 28 Feb 2017 11:44:12 +0100 Subject: [PATCH 21/27] Moved Bindable init --- osu.Game/Screens/Play/Player.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 9ad10c298c..46f93900fc 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -73,6 +73,8 @@ namespace osu.Game.Screens.Play private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config) { dimLevel = config.GetBindable(OsuConfig.DimLevel); + mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); + try { if (Beatmap == null) @@ -160,8 +162,6 @@ namespace osu.Game.Screens.Play scoreOverlay, pauseOverlay }; - - mouseWheelDisabled = config.GetBindable(OsuConfig.MouseDisableWheel); } private void initializeSkipButton() From 585d42f89f44386cabc5d4423e9edfee0ed9bb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 28 Feb 2017 19:01:02 +0100 Subject: [PATCH 22/27] Improve naming and correctness of triangles fading --- osu.Game/Graphics/Backgrounds/Triangles.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 1eac06d472..f3b75ce91a 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -39,10 +39,11 @@ namespace osu.Game.Graphics.Backgrounds private float triangleScale = 1; /// - /// Whether we should exponentially drop-off alpha values to improve the visual appearance of unbuffered fades. - /// This defaults to on as it is generally more aesthetically pleasing, but should be turned off in buffered contexts. + /// Whether we should drop-off alpha values of triangles more quickly to improve + /// the visual appearance of fading. This defaults to on as it is generally more + /// aesthetically pleasing, but should be turned off in s. /// - public bool ExponentialAlphaAdjust = true; + public bool HideAlphaDiscrepancies = true; public float TriangleScale { @@ -70,7 +71,10 @@ namespace osu.Game.Graphics.Backgrounds { base.Update(); - float adjustedAlpha = ExponentialAlphaAdjust ? (float)Math.Pow(((Color4)DrawInfo.Colour.Colour).A, 3) : 1; + float adjustedAlpha = HideAlphaDiscrepancies ? + // Cubically scale alpha to make it drop off more sharply. + (float)Math.Pow(DrawInfo.Colour.AverageColour.Linear.A, 3) : + 1; foreach (var t in Children) { From f0e9ed463627284e1cae8cf52e180a22cea7c958 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 11:56:14 +0900 Subject: [PATCH 23/27] Fix regression in TrianglesPiece. --- osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs index 33ed93e625..26d44f3865 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/TrianglesPiece.cs @@ -14,6 +14,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces public TrianglesPiece() { TriangleScale = 1.2f; + HideAlphaDiscrepancies = false; } protected override void Update() From ec83da2845260a4163034ba5284e190eb46af52a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 11:56:26 +0900 Subject: [PATCH 24/27] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index b061324151..4c0762eec2 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit b0613241512e46eed9dc16ae08ed4064d2db4101 +Subproject commit 4c0762eec20d2a3063df908a49432326570bea9f From 22c46ec9fb03dacb89cc413131781a30e63e7094 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Mar 2017 13:03:33 +0900 Subject: [PATCH 25/27] Fix CI? --- osu.Desktop.Tests/osu.Desktop.Tests.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Desktop.Tests/osu.Desktop.Tests.csproj b/osu.Desktop.Tests/osu.Desktop.Tests.csproj index 9037acb220..07495311e0 100644 --- a/osu.Desktop.Tests/osu.Desktop.Tests.csproj +++ b/osu.Desktop.Tests/osu.Desktop.Tests.csproj @@ -54,9 +54,6 @@ $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - $(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll - From cc92459ee14d995ad2c78f437188e796ce5eb5a1 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Wed, 1 Mar 2017 13:22:01 +0300 Subject: [PATCH 26/27] KeyCounter visibility --- osu.Game/Configuration/OsuConfigManager.cs | 3 ++- osu.Game/Modes/UI/ScoreOverlay.cs | 24 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 84116a1f70..70bfbb5992 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -33,6 +33,8 @@ namespace osu.Game.Configuration Set(OsuConfig.SnakingOutSliders, false); Set(OsuConfig.MenuParallax, true); + + Set(OsuConfig.KeyOverlay, false); //todo: implement all settings below this line (remove the Disabled set when doing so). Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; @@ -80,7 +82,6 @@ namespace osu.Game.Configuration Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true; Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true; Set(OsuConfig.IgnoreList, string.Empty).Disabled = true; - Set(OsuConfig.KeyOverlay, false).Disabled = true; Set(OsuConfig.Language, @"unknown").Disabled = true; Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true; Set(OsuConfig.LastVersion, string.Empty).Disabled = true; diff --git a/osu.Game/Modes/UI/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs index e43009adda..cd676fc7ef 100644 --- a/osu.Game/Modes/UI/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -9,6 +9,9 @@ using osu.Game.Modes.Objects; using OpenTK; using osu.Framework.Graphics.Primitives; using osu.Game.Screens.Play; +using osu.Framework.Allocation; +using osu.Game.Configuration; +using osu.Framework.Configuration; namespace osu.Game.Modes.UI { @@ -21,6 +24,8 @@ namespace osu.Game.Modes.UI public HealthDisplay HealthDisplay; public Score Score { get; set; } + private Bindable showKeyCounter; + protected abstract KeyCounterCollection CreateKeyCounter(); protected abstract ComboCounter CreateComboCounter(); protected abstract PercentageCounter CreateAccuracyCounter(); @@ -58,6 +63,25 @@ namespace osu.Game.Modes.UI }; } + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); + + if (showKeyCounter) + KeyCounter.Show(); + else KeyCounter.Hide(); + + showKeyCounter.ValueChanged += visibilityChanged; + } + + 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. From a6504e8f220c52b7744803b9451a6f420f49e114 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Wed, 1 Mar 2017 13:36:53 +0300 Subject: [PATCH 27/27] Triggering fix --- osu.Game/Modes/UI/ScoreOverlay.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/osu.Game/Modes/UI/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs index cd676fc7ef..d9283c52cb 100644 --- a/osu.Game/Modes/UI/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -67,19 +67,16 @@ namespace osu.Game.Modes.UI private void load(OsuConfigManager config) { showKeyCounter = config.GetBindable(OsuConfig.KeyOverlay); - - if (showKeyCounter) - KeyCounter.Show(); - else KeyCounter.Hide(); - showKeyCounter.ValueChanged += visibilityChanged; + showKeyCounter.TriggerChange(); } private void visibilityChanged(object sender, EventArgs e) { if (showKeyCounter) KeyCounter.Show(); - else KeyCounter.Hide(); + else + KeyCounter.Hide(); } public void BindProcessor(ScoreProcessor processor)