mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 20:57:28 +09:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap_scores
This commit is contained in:
commit
8688afecde
@ -233,7 +233,8 @@ namespace osu.Desktop.Overlays
|
|||||||
Text = @"Update ready to install. Click to restart!",
|
Text = @"Update ready to install. Click to restart!",
|
||||||
Activated = () =>
|
Activated = () =>
|
||||||
{
|
{
|
||||||
UpdateManager.RestartAppWhenExited();
|
// Squirrel returns execution to us after the update process is started, so it's safe to use Wait() here
|
||||||
|
UpdateManager.RestartAppWhenExited().Wait();
|
||||||
game.GracefullyExit();
|
game.GracefullyExit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -341,6 +341,8 @@ namespace osu.Game.Beatmaps
|
|||||||
/// Returns a <see cref="BeatmapSetInfo"/> to a usable state if it has previously been deleted but not yet purged.
|
/// Returns a <see cref="BeatmapSetInfo"/> to a usable state if it has previously been deleted but not yet purged.
|
||||||
/// Is a no-op for already usable beatmaps.
|
/// Is a no-op for already usable beatmaps.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="beatmaps">The store to restore beatmaps from.</param>
|
||||||
|
/// <param name="files">The store to restore beatmap files from.</param>
|
||||||
/// <param name="beatmapSet">The beatmap to restore.</param>
|
/// <param name="beatmapSet">The beatmap to restore.</param>
|
||||||
private void undelete(BeatmapStore beatmaps, FileStore files, BeatmapSetInfo beatmapSet)
|
private void undelete(BeatmapStore beatmaps, FileStore files, BeatmapSetInfo beatmapSet)
|
||||||
{
|
{
|
||||||
@ -426,6 +428,8 @@ namespace osu.Game.Beatmaps
|
|||||||
/// Import a beamap into our local <see cref="FileStore"/> storage.
|
/// Import a beamap into our local <see cref="FileStore"/> storage.
|
||||||
/// If the beatmap is already imported, the existing instance will be returned.
|
/// If the beatmap is already imported, the existing instance will be returned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="files">The store to import beatmap files to.</param>
|
||||||
|
/// <param name="beatmaps">The store to import beatmaps to.</param>
|
||||||
/// <param name="reader">The beatmap archive to be read.</param>
|
/// <param name="reader">The beatmap archive to be read.</param>
|
||||||
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
|
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
|
||||||
private BeatmapSetInfo importToStorage(FileStore files, BeatmapStore beatmaps, ArchiveReader reader)
|
private BeatmapSetInfo importToStorage(FileStore files, BeatmapStore beatmaps, ArchiveReader reader)
|
||||||
|
@ -102,7 +102,7 @@ namespace osu.Game.Database
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public new int SaveChanges(IDbContextTransaction transaction = null)
|
public int SaveChanges(IDbContextTransaction transaction = null)
|
||||||
{
|
{
|
||||||
var ret = base.SaveChanges();
|
var ret = base.SaveChanges();
|
||||||
transaction?.Commit();
|
transaction?.Commit();
|
||||||
@ -262,7 +262,7 @@ namespace osu.Game.Database
|
|||||||
throw new MigrationFailedException(e);
|
throw new MigrationFailedException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (MigrationFailedException e)
|
catch (MigrationFailedException)
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.IO
|
|||||||
{
|
{
|
||||||
public readonly IResourceStore<byte[]> Store;
|
public readonly IResourceStore<byte[]> Store;
|
||||||
|
|
||||||
public Storage Storage => base.Storage;
|
public new Storage Storage => base.Storage;
|
||||||
|
|
||||||
public FileStore(Func<OsuDbContext> createContext, Storage storage) : base(createContext, storage.GetStorageForDirectory(@"files"))
|
public FileStore(Func<OsuDbContext> createContext, Storage storage) : base(createContext, storage.GetStorageForDirectory(@"files"))
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,8 @@ namespace osu.Game.Online.API.Requests
|
|||||||
{
|
{
|
||||||
MostPlayed,
|
MostPlayed,
|
||||||
Favourite,
|
Favourite,
|
||||||
RankedAndApproved
|
RankedAndApproved,
|
||||||
|
Unranked,
|
||||||
|
Graveyard
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
|
|
||||||
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
|
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
|
||||||
{
|
{
|
||||||
|
Width = 400;
|
||||||
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
|
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ namespace osu.Game.Overlays
|
|||||||
switch (displayStyle)
|
switch (displayStyle)
|
||||||
{
|
{
|
||||||
case PanelDisplayStyle.Grid:
|
case PanelDisplayStyle.Grid:
|
||||||
return new DirectGridPanel(b) { Width = 400 };
|
return new DirectGridPanel(b);
|
||||||
default:
|
default:
|
||||||
return new DirectListPanel(b);
|
return new DirectListPanel(b);
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,9 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
|||||||
|
|
||||||
private readonly BeatmapSetType type;
|
private readonly BeatmapSetType type;
|
||||||
|
|
||||||
private DirectPanel playing;
|
private DirectPanel currentlyPlaying;
|
||||||
|
|
||||||
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user, string header, string missing)
|
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user, string header, string missing = "None... yet.")
|
||||||
: base(user, header, missing)
|
: base(user, header, missing)
|
||||||
{
|
{
|
||||||
this.type = type;
|
this.type = type;
|
||||||
@ -27,7 +27,6 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
|||||||
ItemsPerPage = 6;
|
ItemsPerPage = 6;
|
||||||
|
|
||||||
ItemsContainer.Spacing = new Vector2(panel_padding);
|
ItemsContainer.Spacing = new Vector2(panel_padding);
|
||||||
ItemsContainer.Margin = new MarginPadding { Bottom = panel_padding };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ShowMore()
|
protected override void ShowMore()
|
||||||
@ -52,24 +51,18 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
|||||||
if (!s.OnlineBeatmapSetID.HasValue)
|
if (!s.OnlineBeatmapSetID.HasValue)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var subReq = new GetBeatmapSetRequest(s.OnlineBeatmapSetID.Value);
|
var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets));
|
||||||
subReq.Success += b =>
|
ItemsContainer.Add(panel);
|
||||||
|
|
||||||
|
panel.PreviewPlaying.ValueChanged += isPlaying =>
|
||||||
{
|
{
|
||||||
var panel = new DirectGridPanel(b.ToBeatmapSet(Rulesets)) { Width = 400 };
|
if (!isPlaying) return;
|
||||||
ItemsContainer.Add(panel);
|
|
||||||
|
|
||||||
panel.PreviewPlaying.ValueChanged += newValue =>
|
if (currentlyPlaying != null && currentlyPlaying != panel)
|
||||||
{
|
currentlyPlaying.PreviewPlaying.Value = false;
|
||||||
if (newValue)
|
|
||||||
{
|
currentlyPlaying = panel;
|
||||||
if (playing != null && playing != panel)
|
|
||||||
playing.PreviewPlaying.Value = false;
|
|
||||||
playing = panel;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Api.Queue(subReq);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,8 +16,10 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new PaginatedBeatmapContainer(BeatmapSetType.Favourite, User, "Favourite Beatmaps", "None... yet."),
|
new PaginatedBeatmapContainer(BeatmapSetType.Favourite, User, "Favourite Beatmaps"),
|
||||||
new PaginatedBeatmapContainer(BeatmapSetType.RankedAndApproved, User, "Ranked & Approved Beatmaps", "None... yet."),
|
new PaginatedBeatmapContainer(BeatmapSetType.RankedAndApproved, User, "Ranked & Approved Beatmaps"),
|
||||||
|
new PaginatedBeatmapContainer(BeatmapSetType.Unranked, User, "Pending Beatmaps"),
|
||||||
|
new PaginatedBeatmapContainer(BeatmapSetType.Graveyard, User, "Graveyarded Beatmaps"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Margin = new MarginPadding { Bottom = 10 }
|
||||||
},
|
},
|
||||||
ShowMoreButton = new OsuHoverContainer
|
ShowMoreButton = new OsuHoverContainer
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
private SpriteText text;
|
private SpriteText text;
|
||||||
|
|
||||||
private readonly RestoreDefaultValueButton<T> restoreDefaultValueButton = new RestoreDefaultValueButton<T>();
|
private readonly RestoreDefaultValueButton restoreDefaultValueButton = new RestoreDefaultValueButton();
|
||||||
|
|
||||||
public bool ShowsDefaultIndicator = true;
|
public bool ShowsDefaultIndicator = true;
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RestoreDefaultValueButton<T> : Box, IHasTooltip
|
private class RestoreDefaultValueButton : Box, IHasTooltip
|
||||||
{
|
{
|
||||||
private Bindable<T> bindable;
|
private Bindable<T> bindable;
|
||||||
internal Bindable<T> Bindable
|
internal Bindable<T> Bindable
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Resources
|
|
||||||
{
|
|
||||||
public static class Resource
|
|
||||||
{
|
|
||||||
public static Stream OpenResource(string name)
|
|
||||||
{
|
|
||||||
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
|
|
||||||
|
|
||||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream($@"osu.Game.Tests.Resources.{name}") ??
|
|
||||||
Assembly.LoadFrom(Path.Combine(localPath, @"osu.Game.Resources.dll")).GetManifestResourceStream($@"osu.Game.Resources.{name}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Zoom target as a relative position in the <see cref="Content"/> space.
|
/// Zoom target as a relative position in the <see cref="ScrollingTimelineContainer.Content"/> space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private float? relativeContentZoomTarget;
|
private float? relativeContentZoomTarget;
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ using osu.Framework.MathUtils;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.IO;
|
using osu.Game.Beatmaps.IO;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.Containers;
|
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
@ -21,8 +20,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
public class Intro : OsuScreen
|
public class Intro : OsuScreen
|
||||||
{
|
{
|
||||||
private readonly IntroSequence introSequence;
|
|
||||||
|
|
||||||
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -43,7 +40,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
private Bindable<bool> menuMusic;
|
private Bindable<bool> menuMusic;
|
||||||
private Track track;
|
private Track track;
|
||||||
private readonly ParallaxContainer parallax;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user