mirror of
https://github.com/osukey/osukey.git
synced 2025-05-02 20:27:27 +09:00
Tidy up BackButton and adjust transitions a bit.
This commit is contained in:
parent
d4670fc64e
commit
3cb9cb647d
@ -16,13 +16,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
private TextAwesome icon;
|
||||
|
||||
private Container leftContainer;
|
||||
private Container rightContainer;
|
||||
|
||||
private Box leftBox;
|
||||
private Box rightBox;
|
||||
|
||||
private const double transform_time = 300.0;
|
||||
private const double transform_time = 600;
|
||||
private const int pulse_length = 250;
|
||||
|
||||
private const float shear = 0.1f;
|
||||
@ -36,7 +33,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
leftContainer = new Container
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Width = 0.4f,
|
||||
@ -56,7 +53,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
},
|
||||
}
|
||||
},
|
||||
rightContainer = new Container
|
||||
new Container
|
||||
{
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
@ -84,10 +81,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
};
|
||||
}
|
||||
|
||||
public override bool Contains(Vector2 screenSpacePos)
|
||||
{
|
||||
return leftBox.Contains(screenSpacePos) || rightBox.Contains(screenSpacePos);
|
||||
}
|
||||
public override bool Contains(Vector2 screenSpacePos) => leftBox.Contains(screenSpacePos) || rightBox.Contains(screenSpacePos);
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user