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:
parent
3ac0da2da3
commit
b3896257ca
@ -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,
|
||||
|
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user