Merge branch 'master' into non-null-beatmap

This commit is contained in:
Dean Herbert 2017-07-19 18:32:42 +09:00 committed by GitHub
commit da92fccdb0
3 changed files with 17 additions and 5 deletions

View File

@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps.IO
AddReader<OszArchiveReader>((storage, path) =>
{
using (var stream = storage.GetStream(path))
return ZipFile.IsZipFile(stream, false);
return stream != null && ZipFile.IsZipFile(stream, false);
});
OsuLegacyDecoder.Register();
}

View File

@ -149,7 +149,11 @@ namespace osu.Game.Database
public void Import(params string[] paths)
{
foreach (string p in paths)
Import(p);
{
//In case the file was imported twice and deleted after the first time
if (File.Exists(p))
Import(p);
}
}
/// <summary>
@ -183,6 +187,8 @@ namespace osu.Game.Database
if (existing != null)
{
GetChildren(existing);
if (existing.DeletePending)
{
existing.DeletePending = false;

View File

@ -28,6 +28,8 @@ namespace osu.Game.Screens.Menu
private readonly BackgroundScreenDefault background;
private Screen songSelect;
private readonly MenuSideFlashes sideFlashes;
protected override BackgroundScreen CreateBackground() => background;
public MainMenu()
@ -49,10 +51,10 @@ namespace osu.Game.Screens.Menu
OnSolo = delegate { Push(consumeSongSelect()); },
OnMulti = delegate { Push(new Lobby()); },
OnExit = delegate { Exit(); },
},
new MenuSideFlashes(),
}
}
}
},
sideFlashes = new MenuSideFlashes(),
};
}
@ -120,6 +122,8 @@ namespace osu.Game.Screens.Menu
Content.FadeOut(length, EasingTypes.InSine);
Content.MoveTo(new Vector2(-800, 0), length, EasingTypes.InSine);
sideFlashes.FadeOut(length / 4, EasingTypes.OutQuint);
}
protected override void OnResuming(Screen last)
@ -137,6 +141,8 @@ namespace osu.Game.Screens.Menu
Content.FadeIn(length, EasingTypes.OutQuint);
Content.MoveTo(new Vector2(0, 0), length, EasingTypes.OutQuint);
sideFlashes.FadeIn(length / 4, EasingTypes.InQuint);
}
protected override bool OnExiting(Screen next)