From 3487dfe23672edd67e016e7c5f9273d7be65fa67 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:32:32 +0300 Subject: [PATCH 01/14] 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 02/14] 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 03/14] 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 04/14] 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 05/14] 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 06/14] 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 07/14] 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 08/14] 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 09/14] 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 10/14] 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 11/14] 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 12/14] 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 13/14] 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 14/14] 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)