mirror of
https://github.com/ppy/osu.git
synced 2025-01-10 10:22:55 +08:00
Use box variant of selection always
This commit is contained in:
parent
fd17966605
commit
aede94a3f3
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -17,6 +16,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
|
|||||||
public EditNotePiece()
|
public EditNotePiece()
|
||||||
{
|
{
|
||||||
Masking = true;
|
Masking = true;
|
||||||
|
CornerRadius = 5;
|
||||||
BorderThickness = 9; // organoleptically chosen to look good enough for all default skins
|
BorderThickness = 9; // organoleptically chosen to look good enough for all default skins
|
||||||
BorderColour = Color4.White;
|
BorderColour = Color4.White;
|
||||||
Height = DefaultNotePiece.NOTE_HEIGHT;
|
Height = DefaultNotePiece.NOTE_HEIGHT;
|
||||||
@ -34,17 +34,5 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
|
|||||||
{
|
{
|
||||||
Colour = colours.Yellow;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user