From aede94a3f3edcac2c0495f05c1193c4b08578b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Thu, 7 Nov 2024 08:41:29 +0100 Subject: [PATCH] Use box variant of selection always --- .../Edit/Blueprints/Components/EditNotePiece.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Edit/Blueprints/Components/EditNotePiece.cs b/osu.Game.Rulesets.Mania/Edit/Blueprints/Components/EditNotePiece.cs index 63f67d6150..a2a5955a9d 100644 --- a/osu.Game.Rulesets.Mania/Edit/Blueprints/Components/EditNotePiece.cs +++ b/osu.Game.Rulesets.Mania/Edit/Blueprints/Components/EditNotePiece.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 osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -17,6 +16,7 @@ public partial class EditNotePiece : CompositeDrawable public EditNotePiece() { Masking = true; + CornerRadius = 5; BorderThickness = 9; // organoleptically chosen to look good enough for all default skins BorderColour = Color4.White; Height = DefaultNotePiece.NOTE_HEIGHT; @@ -34,17 +34,5 @@ private void load(OsuColour colours) { Colour = colours.Yellow; } - - protected override void Update() - { - base.Update(); - - // from anecdotal experience, there are generally two types of user skins: - // one type uses rectangles for notes, and the other uses circles / squarish sprites (various stepmania-likes). - // this is a crude heuristic that attempts to choose the best of both worlds based on aspect ratio alone. - float aspectRatio = DrawWidth / DrawHeight; - bool isSquarish = aspectRatio > 4f / 5 && aspectRatio < 5f / 4; - CornerRadius = isSquarish ? Math.Min(DrawWidth, DrawHeight) / 2 : 5; - } } }