mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Reorder functions and simplify transform logic
This commit is contained in:
parent
0d4ac2f748
commit
10ee8ed8e8
@ -119,6 +119,22 @@ namespace osu.Game.Screens.Import
|
||||
fileSelector.CurrentPath.BindValueChanged(directoryChanged);
|
||||
}
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
contentContainer.ScaleTo(0.95f).ScaleTo(1, duration, Easing.OutQuint);
|
||||
this.FadeInFromZero(duration);
|
||||
}
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
contentContainer.ScaleTo(0.95f, duration, Easing.OutQuint);
|
||||
this.FadeOut(duration, Easing.OutQuint);
|
||||
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
||||
private void directoryChanged(ValueChangedEvent<DirectoryInfo> _)
|
||||
{
|
||||
// this should probably be done by the selector itself, but let's do it here for now.
|
||||
@ -131,24 +147,6 @@ namespace osu.Game.Screens.Import
|
||||
currentFileText.Text = selectedFile.NewValue?.Name ?? "Select a file";
|
||||
}
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
contentContainer.FadeOut().Then().ScaleTo(0.95f)
|
||||
.Then()
|
||||
.ScaleTo(1, duration, Easing.OutQuint)
|
||||
.FadeIn(duration);
|
||||
}
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
contentContainer.ScaleTo(0.95f, duration, Easing.OutQuint);
|
||||
this.FadeOut(duration, Easing.OutQuint);
|
||||
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
||||
private void startImport(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
|
Loading…
Reference in New Issue
Block a user