mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
General improvements
This commit is contained in:
@ -12,6 +12,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Beatmaps.IO;
|
||||
|
||||
namespace osu.Desktop
|
||||
{
|
||||
@ -57,7 +58,7 @@ namespace osu.Desktop
|
||||
var dropData = (object[])e.Data.GetData(DataFormats.FileDrop);
|
||||
var filePaths = dropData.Select(f => f.ToString()).ToArray();
|
||||
|
||||
if (filePaths.All(f => Path.GetExtension(f) == @".osz"))
|
||||
if (filePaths.All(f => Path.GetExtension(f) == BeatmapArchiveReader.OszExtension))
|
||||
Task.Run(() => BeatmapDatabase.Import(filePaths));
|
||||
else if (filePaths.All(f => Path.GetExtension(f) == @".osr"))
|
||||
Task.Run(() =>
|
||||
@ -67,7 +68,7 @@ namespace osu.Desktop
|
||||
});
|
||||
}
|
||||
|
||||
private static readonly string[] allowed_extensions = { @".osz", @".osr" };
|
||||
private static readonly string[] allowed_extensions = { BeatmapArchiveReader.OszExtension, @".osr" };
|
||||
|
||||
private void dragEnter(DragEventArgs e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user