···40 /// Return every base type until (and excluding) <see cref="object"/>
41 /// </summary>
42 /// <param name="t"></param>
43- /// <returns></returns>
44 public static IEnumerable<Type> EnumerateBaseTypes(this Type t)
45 {
46 while (t != null && t != typeof(object))
···40 /// Return every base type until (and excluding) <see cref="object"/>
41 /// </summary>
42 /// <param name="t"></param>
043 public static IEnumerable<Type> EnumerateBaseTypes(this Type t)
44 {
45 while (t != null && t != typeof(object))
-1
osu.Framework/Graphics/Colour4.cs
···89 /// The final alpha is clamped to the 0-1 range.
90 /// </summary>
91 /// <param name="scalar">The value that the existing alpha will be multiplied by.</param>
92- /// <returns></returns>
93 public Colour4 MultiplyAlpha(float scalar)
94 {
95 if (scalar < 0)
···89 /// The final alpha is clamped to the 0-1 range.
90 /// </summary>
91 /// <param name="scalar">The value that the existing alpha will be multiplied by.</param>
092 public Colour4 MultiplyAlpha(float scalar)
93 {
94 if (scalar < 0)
···135 /// </summary>
136 /// <param name="position">The value to clamp.</param>
137 /// <param name="extension">An extension value beyond the normal extent.</param>
138- /// <returns></returns>
139 protected float Clamp(float position, float extension = 0) => Math.Max(Math.Min(position, ScrollableExtent + extension), -extension);
140141 protected override Container<T> Content => ScrollContent;
···135 /// </summary>
136 /// <param name="position">The value to clamp.</param>
137 /// <param name="extension">An extension value beyond the normal extent.</param>
0138 protected float Clamp(float position, float extension = 0) => Math.Max(Math.Min(position, ScrollableExtent + extension), -extension);
139140 protected override Container<T> Content => ScrollContent;
-1
osu.Framework/Graphics/Lines/SmoothPath.cs
···78 /// Retrieves the colour from a position in the texture of the <see cref="Path"/>.
79 /// </summary>
80 /// <param name="position">The position within the texture. 0 indicates the outermost-point of the path, 1 indicates the centre of the path.</param>
81- /// <returns></returns>
82 protected virtual Color4 ColourAt(float position) => Color4.White;
83 }
84}
···78 /// Retrieves the colour from a position in the texture of the <see cref="Path"/>.
79 /// </summary>
80 /// <param name="position">The position within the texture. 0 indicates the outermost-point of the path, 1 indicates the centre of the path.</param>
081 protected virtual Color4 ColourAt(float position) => Color4.White;
82 }
83}
-1
osu.Framework/Graphics/UserInterface/Menu.cs
···538 /// <summary>
539 /// Creates a sub-menu for <see cref="MenuItem.Items"/> of <see cref="MenuItem"/>s added to this <see cref="Menu"/>.
540 /// </summary>
541- /// <returns></returns>
542 protected abstract Menu CreateSubMenu();
543544 /// <summary>
···538 /// <summary>
539 /// Creates a sub-menu for <see cref="MenuItem.Items"/> of <see cref="MenuItem"/>s added to this <see cref="Menu"/>.
540 /// </summary>
0541 protected abstract Menu CreateSubMenu();
542543 /// <summary>
···232233 public string ReadableString()
234 {
235+ var sortedKeys = Keys.GetValuesInOrder().ToArray();
236+237+ return string.Join('-', sortedKeys.Select(key =>
238+ {
239+ switch (key)
240+ {
241+ case InputKey.Control:
242+ if (sortedKeys.Contains(InputKey.LControl) || sortedKeys.Contains(InputKey.RControl))
243+ return null;
244+245+ break;
246+247+ case InputKey.Shift:
248+ if (sortedKeys.Contains(InputKey.LShift) || sortedKeys.Contains(InputKey.RShift))
249+ return null;
250+251+ break;
252+253+ case InputKey.Alt:
254+ if (sortedKeys.Contains(InputKey.LAlt) || sortedKeys.Contains(InputKey.RAlt))
255+ return null;
256+257+ break;
258+259+ case InputKey.Super:
260+ if (sortedKeys.Contains(InputKey.LSuper) || sortedKeys.Contains(InputKey.RSuper))
261+ return null;
262+263+ break;
264+ }
265+266+ return getReadableKey(key);
267+ }).Where(s => !string.IsNullOrEmpty(s)));
268 }
269270 [MethodImpl(MethodImplOptions.AggressiveInlining)]
···290 return false;
291 }
292293+ private static string getReadableKey(InputKey key)
294 {
295 if (key >= InputKey.FirstTabletAuxiliaryButton)
296 return $"Tablet Aux {key - InputKey.FirstTabletAuxiliaryButton + 1}";
-1
osu.Framework/Platform/Display.cs
···59 /// <param name="size">The <see cref="Size"/> to match.</param>
60 /// <param name="bitsPerPixel">The bits per pixel to match. If null, the highest available bits per pixel will be used.</param>
61 /// <param name="refreshRate">The refresh rate in hertz. If null, the highest available refresh rate will be used.</param>
62- /// <returns></returns>
63 public DisplayMode FindDisplayMode(Size size, int? bitsPerPixel = null, int? refreshRate = null) =>
64 DisplayModes.Where(mode => mode.Size.Width <= size.Width && mode.Size.Height <= size.Height &&
65 (bitsPerPixel == null || mode.BitsPerPixel == bitsPerPixel) &&
···59 /// <param name="size">The <see cref="Size"/> to match.</param>
60 /// <param name="bitsPerPixel">The bits per pixel to match. If null, the highest available bits per pixel will be used.</param>
61 /// <param name="refreshRate">The refresh rate in hertz. If null, the highest available refresh rate will be used.</param>
062 public DisplayMode FindDisplayMode(Size size, int? bitsPerPixel = null, int? refreshRate = null) =>
63 DisplayModes.Where(mode => mode.Size.Width <= size.Width && mode.Size.Height <= size.Height &&
64 (bitsPerPixel == null || mode.BitsPerPixel == bitsPerPixel) &&
-2
osu.Framework/Platform/IWindow.cs
···151 /// Convert a screen based coordinate to local window space.
152 /// </summary>
153 /// <param name="point"></param>
154- /// <returns></returns>
155 Point PointToClient(Point point);
156157 /// <summary>
158 /// Convert a window based coordinate to global screen space.
159 /// </summary>
160 /// <param name="point"></param>
161- /// <returns></returns>
162 Point PointToScreen(Point point);
163164 /// <summary>
···151 /// Convert a screen based coordinate to local window space.
152 /// </summary>
153 /// <param name="point"></param>
0154 Point PointToClient(Point point);
155156 /// <summary>
157 /// Convert a window based coordinate to global screen space.
158 /// </summary>
159 /// <param name="point"></param>
0160 Point PointToScreen(Point point);
161162 /// <summary>
···33 /// <param name="group">The group specification.</param>
34 /// <param name="name">The name specification.</param>
35 /// <typeparam name="T">The type.</typeparam>
036 public static GlobalStatistic<T> Get<T>(string group, string name)
37 {
38 lock (statistics)
-1
osu.Framework/Testing/TestScene.cs
···394 /// Remove the "TestScene" prefix from a name.
395 /// </summary>
396 /// <param name="name"></param>
397- /// <returns></returns>
398 public static string RemovePrefix(string name)
399 {
400 return name.Replace("TestCase", string.Empty) // TestScene used to be called TestCase. This handles consumer projects which haven't updated their naming for the near future.
···394 /// Remove the "TestScene" prefix from a name.
395 /// </summary>
396 /// <param name="name"></param>
0397 public static string RemovePrefix(string name)
398 {
399 return name.Replace("TestCase", string.Empty) // TestScene used to be called TestCase. This handles consumer projects which haven't updated their naming for the near future.
-1
osu.Framework/Utils/Interpolation.cs
···26 /// <param name="final">The end value.</param>
27 /// <param name="base">The base of the exponential. The valid range is [0, 1], where smaller values mean that the final value is achieved more quickly, and values closer to 1 results in slow convergence to the final value.</param>
28 /// <param name="exponent">The exponent of the exponential. An exponent of 0 results in the start values, whereas larger exponents make the result converge to the final value.</param>
29- /// <returns></returns>
30 public static double Damp(double start, double final, double @base, double exponent)
31 {
32 if (@base < 0 || @base > 1)
···26 /// <param name="final">The end value.</param>
27 /// <param name="base">The base of the exponential. The valid range is [0, 1], where smaller values mean that the final value is achieved more quickly, and values closer to 1 results in slow convergence to the final value.</param>
28 /// <param name="exponent">The exponent of the exponential. An exponent of 0 results in the start values, whereas larger exponents make the result converge to the final value.</param>
029 public static double Damp(double start, double final, double @base, double exponent)
30 {
31 if (@base < 0 || @base > 1)
-1
osu.Framework/Utils/PathApproximator.cs
···314 /// Computes various properties that can be used to approximate the circular arc.
315 /// </summary>
316 /// <param name="controlPoints">Three distinct points on the arc.</param>
317- /// <returns></returns>
318 private static CircularArcProperties circularArcProperties(ReadOnlySpan<Vector2> controlPoints)
319 {
320 Vector2 a = controlPoints[0];
···314 /// Computes various properties that can be used to approximate the circular arc.
315 /// </summary>
316 /// <param name="controlPoints">Three distinct points on the arc.</param>
0317 private static CircularArcProperties circularArcProperties(ReadOnlySpan<Vector2> controlPoints)
318 {
319 Vector2 a = controlPoints[0];
+1-1
osu.Framework/osu.Framework.csproj
···46 See https://github.com/NuGet/Home/issues/4514 and https://github.com/dotnet/sdk/issues/765 . -->
47 <PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2021.115.0" />
48 <PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
49- <PackageReference Include="OpenTabletDriver" Version="0.5.2.3" />
50 <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" />
51 <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.9.0">
52 <NoWarn>NU1701</NoWarn> <!-- Requires .NETFramework for MSBuild, but we use Microsoft.Build.Locator which allows this package to work in .NETCoreApp. -->
···46 See https://github.com/NuGet/Home/issues/4514 and https://github.com/dotnet/sdk/issues/765 . -->
47 <PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2021.115.0" />
48 <PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
49+ <PackageReference Include="OpenTabletDriver" Version="0.5.3" />
50 <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" />
51 <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.9.0">
52 <NoWarn>NU1701</NoWarn> <!-- Requires .NETFramework for MSBuild, but we use Microsoft.Build.Locator which allows this package to work in .NETCoreApp. -->