mirror of
https://github.com/ppy/osu
synced 2025-01-18 12:00:58 +00:00
Merge branch 'master' into use-has-flags
This commit is contained in:
commit
84c13174d9
@ -148,7 +148,7 @@ namespace osu.Game.Beatmaps
|
||||
return;
|
||||
}
|
||||
|
||||
var downloadNotification = new ProgressNotification
|
||||
var downloadNotification = new DownloadNotification
|
||||
{
|
||||
CompletionText = $"Imported {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}!",
|
||||
Text = $"Downloading {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}",
|
||||
@ -460,5 +460,21 @@ namespace osu.Game.Beatmaps
|
||||
protected override Texture GetBackground() => null;
|
||||
protected override Track GetTrack() => null;
|
||||
}
|
||||
|
||||
private class DownloadNotification : ProgressNotification
|
||||
{
|
||||
public override bool IsImportant => false;
|
||||
|
||||
protected override Notification CreateCompletionNotification() => new SilencedProgressCompletionNotification
|
||||
{
|
||||
Activated = CompletionClickAction,
|
||||
Text = CompletionText
|
||||
};
|
||||
|
||||
private class SilencedProgressCompletionNotification : ProgressCompletionNotification
|
||||
{
|
||||
public override bool IsImportant => false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,28 +62,30 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
||||
{
|
||||
var strippedLine = StripComments(line);
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case Section.General:
|
||||
handleGeneral(line);
|
||||
handleGeneral(strippedLine);
|
||||
return;
|
||||
case Section.Editor:
|
||||
handleEditor(line);
|
||||
handleEditor(strippedLine);
|
||||
return;
|
||||
case Section.Metadata:
|
||||
handleMetadata(line);
|
||||
return;
|
||||
case Section.Difficulty:
|
||||
handleDifficulty(line);
|
||||
handleDifficulty(strippedLine);
|
||||
return;
|
||||
case Section.Events:
|
||||
handleEvent(line);
|
||||
handleEvent(strippedLine);
|
||||
return;
|
||||
case Section.TimingPoints:
|
||||
handleTimingPoint(line);
|
||||
handleTimingPoint(strippedLine);
|
||||
return;
|
||||
case Section.HitObjects:
|
||||
handleHitObject(line);
|
||||
handleHitObject(strippedLine);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
protected virtual void ParseLine(T output, Section section, string line)
|
||||
{
|
||||
line = StripComments(line);
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case Section.Colours:
|
||||
@ -65,6 +67,14 @@ namespace osu.Game.Beatmaps.Formats
|
||||
}
|
||||
}
|
||||
|
||||
protected string StripComments(string line)
|
||||
{
|
||||
var index = line.IndexOf("//", StringComparison.Ordinal);
|
||||
if (index > 0)
|
||||
return line.Substring(0, index);
|
||||
return line;
|
||||
}
|
||||
|
||||
private bool hasComboColours;
|
||||
|
||||
private void handleColours(T output, string line)
|
||||
|
@ -42,6 +42,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
protected override void ParseLine(Storyboard storyboard, Section section, string line)
|
||||
{
|
||||
line = StripComments(line);
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case Section.Events:
|
||||
|
@ -128,7 +128,8 @@ namespace osu.Game.Overlays
|
||||
var section = sections.Children.FirstOrDefault(s => s.AcceptTypes.Any(accept => accept.IsAssignableFrom(ourType)));
|
||||
section?.Add(notification, notification.DisplayOnTop ? -runningDepth : runningDepth);
|
||||
|
||||
State = Visibility.Visible;
|
||||
if (notification.IsImportant)
|
||||
State = Visibility.Visible;
|
||||
|
||||
updateCounts();
|
||||
});
|
||||
|
@ -23,6 +23,11 @@ namespace osu.Game.Overlays.Notifications
|
||||
/// </summary>
|
||||
public event Action Closed;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this notification should forcefully display itself.
|
||||
/// </summary>
|
||||
public virtual bool IsImportant => true;
|
||||
|
||||
/// <summary>
|
||||
/// Run on user activating the notification. Return true to close.
|
||||
/// </summary>
|
||||
|
@ -219,9 +219,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
if (!IsCurrentScreen) return;
|
||||
|
||||
//we want to hide the hitrenderer immediately (looks better).
|
||||
//we may be able to remove this once the mouse cursor trail is improved.
|
||||
RulesetContainer?.Hide();
|
||||
pauseContainer.Hide();
|
||||
Restart();
|
||||
},
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
protected override void ParseLine(SkinConfiguration skin, Section section, string line)
|
||||
{
|
||||
line = StripComments(line);
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case Section.General:
|
||||
|
Loading…
Reference in New Issue
Block a user