1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Move shear amount to constant

This commit is contained in:
Bartłomiej Dach 2022-03-31 22:09:03 +02:00
parent 3ac0da2da3
commit b3896257ca
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 5 additions and 3 deletions

View File

@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("create button", () =>
{
Child = button = new ShearedToggleButton(0.2f)
Child = button = new ShearedToggleButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("create button", () =>
{
Child = button = new ShearedToggleButton(0.2f)
Child = button = new ShearedToggleButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -37,10 +37,12 @@ namespace osu.Game.Graphics.UserInterface
private Sample? sampleOff;
private Sample? sampleOn;
private const float shear = 0.2f;
[Resolved]
private OverlayColourProvider colourProvider { get; set; } = null!;
public ShearedToggleButton(float shear)
public ShearedToggleButton()
{
Height = 50;
Padding = new MarginPadding { Horizontal = shear * 50 };