From 10b1fb236fb37c89a1659400b42ea51db03a2281 Mon Sep 17 00:00:00 2001 From: srb2thepast Date: Tue, 10 Jan 2023 17:50:17 -0500 Subject: [PATCH] final cleanup --- .../CatchObjectInspectorRuleset.cs | 1 - .../Screens/ObjectInspection/DebugValueList.cs | 9 ++++----- .../Screens/ObjectInspection/ObjectInspector.cs | 15 +++------------ .../ObjectInspection/OsuObjectInspectorRuleset.cs | 11 +---------- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/PerformanceCalculatorGUI/Screens/ObjectInspection/CatchObjectInspectorRuleset.cs b/PerformanceCalculatorGUI/Screens/ObjectInspection/CatchObjectInspectorRuleset.cs index 2d6abc8..77b9f39 100644 --- a/PerformanceCalculatorGUI/Screens/ObjectInspection/CatchObjectInspectorRuleset.cs +++ b/PerformanceCalculatorGUI/Screens/ObjectInspection/CatchObjectInspectorRuleset.cs @@ -1,7 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System; using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; diff --git a/PerformanceCalculatorGUI/Screens/ObjectInspection/DebugValueList.cs b/PerformanceCalculatorGUI/Screens/ObjectInspection/DebugValueList.cs index f646f05..57b8b93 100644 --- a/PerformanceCalculatorGUI/Screens/ObjectInspection/DebugValueList.cs +++ b/PerformanceCalculatorGUI/Screens/ObjectInspection/DebugValueList.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reflection; using osu.Framework.Allocation; -using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; @@ -14,7 +12,6 @@ using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Overlays; -using osu.Game.Rulesets.Difficulty.Preprocessing; using osuTK; namespace PerformanceCalculatorGUI.Screens.ObjectInspection @@ -122,7 +119,8 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection RelativeSizeAxes = Axes.Both }); - for (int i = 1; i < InternalDict.Keys.Count; i++) { + for (int i = 1; i < InternalDict.Keys.Count; i++) + { string group = InternalDict.Keys.ElementAt(i); switchContainer.Add(new SpriteText { @@ -147,7 +145,8 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection UpdateToggles(); } - public bool GroupExists(string name) { + public bool GroupExists(string name) + { return InternalDict.ContainsKey(name); } diff --git a/PerformanceCalculatorGUI/Screens/ObjectInspection/ObjectInspector.cs b/PerformanceCalculatorGUI/Screens/ObjectInspection/ObjectInspector.cs index af2b9ac..80a6ba0 100644 --- a/PerformanceCalculatorGUI/Screens/ObjectInspection/ObjectInspector.cs +++ b/PerformanceCalculatorGUI/Screens/ObjectInspection/ObjectInspector.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; @@ -13,13 +12,10 @@ using osu.Framework.Input.Events; using osu.Game.Beatmaps; using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; -using osu.Game.Graphics.UserInterface; using osu.Game.Overlays; using osu.Game.Rulesets; using osu.Game.Rulesets.Catch.UI; using osu.Game.Rulesets.Difficulty; -using osu.Game.Rulesets.Difficulty.Skills; -using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.UI; using osu.Game.Rulesets.Taiko.UI; @@ -27,13 +23,8 @@ using osu.Game.Rulesets.UI; using osu.Game.Screens.Edit; using osu.Game.Screens.Edit.Components; using osu.Game.Screens.Edit.Components.Timelines.Summary; -using osu.Game.Screens.Menu; -using osuTK.Graphics.ES31; using osuTK.Input; -using SharpGen.Runtime.Win32; using osu.Game.Rulesets.Difficulty.Preprocessing; -using FFmpeg.AutoGen; -using System; using osu.Framework.Timing; namespace PerformanceCalculatorGUI.Screens.ObjectInspection @@ -122,7 +113,7 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection Anchor = Anchor.Centre, Masking = true, CornerRadius = 15f, - Padding = new MarginPadding() { Left = side_bar_width , Right = 0}, + Padding = new MarginPadding() { Left = side_bar_width, Right = 0 }, RelativeSizeAxes = Axes.Both, Child = clock, }); @@ -303,8 +294,8 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection var amt = 0.25; - amt = e.ControlPressed ? amt * 2: amt; - amt = e.ShiftPressed ? amt * 0.5: amt; + amt = e.ControlPressed ? amt * 2 : amt; + amt = e.ShiftPressed ? amt * 0.5 : amt; if (e.Key == Key.Q) { clock.SeekBackward(amount: amt); diff --git a/PerformanceCalculatorGUI/Screens/ObjectInspection/OsuObjectInspectorRuleset.cs b/PerformanceCalculatorGUI/Screens/ObjectInspection/OsuObjectInspectorRuleset.cs index a635130..d921ca0 100644 --- a/PerformanceCalculatorGUI/Screens/ObjectInspection/OsuObjectInspectorRuleset.cs +++ b/PerformanceCalculatorGUI/Screens/ObjectInspection/OsuObjectInspectorRuleset.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using System.Reflection; using osu.Framework.Graphics; using osu.Framework.Allocation; using osu.Game.Beatmaps; @@ -16,18 +15,10 @@ using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.UI; using osu.Game.Rulesets.UI; -using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing; using System; using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Osu.Difficulty.Evaluators; -using SharpCompress.Common; using osu.Framework.Utils; -using Remotion.Linq.Clauses.ResultOperators; -using osu.Game.Rulesets.Taiko.Objects; -using osu.Game.Rulesets.Difficulty.Skills; -using osu.Game.Skinning; -using NUnit.Framework.Internal; -using osu.Game.Screens.Edit; namespace PerformanceCalculatorGUI.Screens.ObjectInspection { @@ -79,7 +70,7 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection OsuHitObject baseHit = (OsuHitObject)osuDiffHit.BaseObject; string groupName = osuDiffHit.BaseObject.GetType().Name; - valueList.AddGroup(groupName,new string[] { "Slider", "HitCircle","Spinner" }); + valueList.AddGroup(groupName, new string[] { "Slider", "HitCircle", "Spinner" }); valueList.SetValue(groupName, "Position", baseHit.StackedPosition); valueList.SetValue(groupName, "Strain Time", osuDiffHit.StrainTime); valueList.SetValue(groupName, "Aim Difficulty", AimEvaluator.EvaluateDifficultyOf(osuDiffHit, true));