From f829caf197c7565bf8d4995073d1eae17c183579 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 19 Aug 2017 07:21:20 +0900 Subject: [PATCH 1/6] Fix custom logic still existing in OsuInputManager --- osu.Game.Rulesets.Osu/OsuInputManager.cs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/osu.Game.Rulesets.Osu/OsuInputManager.cs b/osu.Game.Rulesets.Osu/OsuInputManager.cs index a29b128e07..0c4384c006 100644 --- a/osu.Game.Rulesets.Osu/OsuInputManager.cs +++ b/osu.Game.Rulesets.Osu/OsuInputManager.cs @@ -2,13 +2,8 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; -using System.Linq; -using osu.Framework.Input; using osu.Framework.Input.Bindings; using osu.Game.Input.Bindings; -using OpenTK.Input; -using KeyboardState = osu.Framework.Input.KeyboardState; -using MouseState = osu.Framework.Input.MouseState; namespace osu.Game.Rulesets.Osu { @@ -16,22 +11,6 @@ namespace osu.Game.Rulesets.Osu { public OsuInputManager(RulesetInfo ruleset) : base(ruleset, 0, SimultaneousBindingMode.Unique) { - - } - protected override void TransformState(InputState state) - { - base.TransformState(state); - - var mouse = state.Mouse as MouseState; - var keyboard = state.Keyboard as KeyboardState; - - if (mouse != null && keyboard != null) - { - if (mouse.IsPressed(MouseButton.Left)) - keyboard.Keys = keyboard.Keys.Concat(new[] { Key.LastKey + 1 }); - if (mouse.IsPressed(MouseButton.Right)) - keyboard.Keys = keyboard.Keys.Concat(new[] { Key.LastKey + 2 }); - } } } From 1e6d99a4ef1e0787b9863cc72545e69286db332f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 19 Aug 2017 07:31:03 +0900 Subject: [PATCH 2/6] Update paths --- osu.Desktop.Deploy/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Desktop.Deploy/Program.cs b/osu.Desktop.Deploy/Program.cs index 37776b329f..644987ce5a 100644 --- a/osu.Desktop.Deploy/Program.cs +++ b/osu.Desktop.Deploy/Program.cs @@ -17,8 +17,8 @@ namespace osu.Desktop.Deploy { internal static class Program { - private const string nuget_path = @"packages\NuGet.CommandLine.3.5.0\tools\NuGet.exe"; - private const string squirrel_path = @"packages\squirrel.windows.1.5.2\tools\Squirrel.exe"; + private const string nuget_path = @"packages\NuGet.CommandLine.4.1.0\tools\NuGet.exe"; + private const string squirrel_path = @"packages\squirrel.windows.1.7.5\tools\Squirrel.exe"; private const string msbuild_path = @"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"; public static string StagingFolder = ConfigurationManager.AppSettings["StagingFolder"]; From 3ea7be1ccfef8643fcc94597d9b542dbb43d0909 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 19 Aug 2017 12:26:54 +0900 Subject: [PATCH 3/6] Fix selecting unranked beatmaps in song select crashing the game. Fixes #1134. --- osu.Game/Graphics/UserInterface/BarGraph.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/BarGraph.cs b/osu.Game/Graphics/UserInterface/BarGraph.cs index 87b4ab9e40..1a980e6bd5 100644 --- a/osu.Game/Graphics/UserInterface/BarGraph.cs +++ b/osu.Game/Graphics/UserInterface/BarGraph.cs @@ -44,19 +44,31 @@ namespace osu.Game.Graphics.UserInterface { List bars = Children.ToList(); foreach (var bar in value.Select((length, index) => new { Value = length, Bar = bars.Count > index ? bars[index] : null })) + { + float length = MaxValue ?? value.Max(); + if (length != 0) + length = bar.Value / length; + + float size = value.Count(); + if (size != 0) + size = 1.0f / size; + if (bar.Bar != null) { - bar.Bar.Length = bar.Value / (MaxValue ?? value.Max()); - bar.Bar.Size = (direction & BarDirection.Horizontal) > 0 ? new Vector2(1, 1.0f / value.Count()) : new Vector2(1.0f / value.Count(), 1); + bar.Bar.Length = length; + bar.Bar.Size = (direction & BarDirection.Horizontal) > 0 ? new Vector2(1, size) : new Vector2(size, 1); } else + { Add(new Bar { RelativeSizeAxes = Axes.Both, - Size = (direction & BarDirection.Horizontal) > 0 ? new Vector2(1, 1.0f / value.Count()) : new Vector2(1.0f / value.Count(), 1), - Length = bar.Value / (MaxValue ?? value.Max()), + Size = (direction & BarDirection.Horizontal) > 0 ? new Vector2(1, size) : new Vector2(size, 1), + Length = length, Direction = Direction, }); + } + } //I'm using ToList() here because Where() returns an Enumerable which can change it's elements afterwards RemoveRange(Children.Where((bar, index) => index >= value.Count()).ToList()); } From 9bebb9f5b0ec5c087801504fce2eaee06850dc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 19 Aug 2017 16:09:32 +0200 Subject: [PATCH 4/6] Remove now unused SliderBar class --- .../Visual/TestCaseKeyCounter.cs | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs index 1861a77a3a..e8b6e6378e 100644 --- a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs +++ b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs @@ -41,38 +41,5 @@ namespace osu.Desktop.Tests.Visual Add(kc); } - private class TestSliderBar : SliderBar where T : struct - { - public Color4 Color - { - get { return Box.Colour; } - set { Box.Colour = value; } - } - - public Color4 SelectionColor - { - get { return SelectionBox.Colour; } - set { SelectionBox.Colour = value; } - } - - protected readonly Box SelectionBox; - protected readonly Box Box; - - public TestSliderBar() - { - Children = new Drawable[] - { - Box = new Box { RelativeSizeAxes = Axes.Both }, - SelectionBox = new Box { RelativeSizeAxes = Axes.Both } - }; - } - - protected override void UpdateValue(float value) - { - SelectionBox.ScaleTo( - new Vector2(value, 1), - 300, Easing.OutQuint); - } - } } } From 7e1df7907febed0cab5d5d423a0f917e7ddc6df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 19 Aug 2017 17:43:02 +0200 Subject: [PATCH 5/6] Remove now unnecessary usings --- osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs index e8b6e6378e..ffe37c83a6 100644 --- a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs +++ b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs @@ -2,12 +2,8 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; -using osu.Framework.Graphics.Shapes; -using osu.Framework.Graphics.UserInterface; using osu.Framework.MathUtils; using osu.Game.Screens.Play; -using OpenTK; -using OpenTK.Graphics; using OpenTK.Input; namespace osu.Desktop.Tests.Visual From 9b20da94e7cc0d1c27819b8bbb6d7bd4fc546302 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Sat, 19 Aug 2017 22:07:03 +0200 Subject: [PATCH 6/6] change Query to AllRulesets --- osu.Game/Input/KeyBindingStore.cs | 2 +- osu.Game/Overlays/KeyBindingOverlay.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Input/KeyBindingStore.cs b/osu.Game/Input/KeyBindingStore.cs index f50acb4802..56302acafe 100644 --- a/osu.Game/Input/KeyBindingStore.cs +++ b/osu.Game/Input/KeyBindingStore.cs @@ -18,7 +18,7 @@ namespace osu.Game.Input public KeyBindingStore(SQLiteConnection connection, RulesetStore rulesets, Storage storage = null) : base(connection, storage) { - foreach (var info in rulesets.Query()) + foreach (var info in rulesets.AllRulesets) { var ruleset = info.CreateInstance(); foreach (var variant in ruleset.AvailableVariants) diff --git a/osu.Game/Overlays/KeyBindingOverlay.cs b/osu.Game/Overlays/KeyBindingOverlay.cs index 7d6ef7ffa6..827d361099 100644 --- a/osu.Game/Overlays/KeyBindingOverlay.cs +++ b/osu.Game/Overlays/KeyBindingOverlay.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays { AddSection(new GlobalKeyBindingsSection(global, "Global")); - foreach (var ruleset in rulesets.Query()) + foreach (var ruleset in rulesets.AllRulesets) AddSection(new RulesetBindingsSection(ruleset)); }