mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Fix osu! logo drag area being a square
This commit is contained in:
parent
90a68880ea
commit
0efbae6e70
@ -113,7 +113,7 @@ namespace osu.Game.Screens.Menu
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
logoBounceContainer = new DragContainer
|
||||
logoBounceContainer = new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
@ -407,8 +407,6 @@ namespace osu.Game.Screens.Menu
|
||||
impactContainer.ScaleTo(1.12f, 250);
|
||||
}
|
||||
|
||||
private class DragContainer : Container
|
||||
{
|
||||
public override bool DragBlocksClick => false;
|
||||
|
||||
protected override bool OnDragStart(DragStartEvent e) => true;
|
||||
@ -420,14 +418,13 @@ namespace osu.Game.Screens.Menu
|
||||
// Diminish the drag distance as we go further to simulate "rubber band" feeling.
|
||||
change *= change.Length <= 0 ? 0 : MathF.Pow(change.Length, 0.6f) / change.Length;
|
||||
|
||||
this.MoveTo(change);
|
||||
logoBounceContainer.MoveTo(change);
|
||||
}
|
||||
|
||||
protected override void OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
this.MoveTo(Vector2.Zero, 800, Easing.OutElastic);
|
||||
logoBounceContainer.MoveTo(Vector2.Zero, 800, Easing.OutElastic);
|
||||
base.OnDragEnd(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user