mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:03:22 +08:00
Merge remote-tracking branch 'upstream/master' into linq
This commit is contained in:
commit
ddba7254ca
@ -30,10 +30,10 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
Anchor = Anchor.TopCentre;
|
Anchor = Anchor.TopCentre;
|
||||||
Origin = Anchor.TopCentre;
|
Origin = Anchor.TopCentre;
|
||||||
|
|
||||||
ScaledContent.Anchor = Anchor.BottomLeft;
|
base.Content.Anchor = Anchor.BottomLeft;
|
||||||
ScaledContent.Origin = Anchor.BottomLeft;
|
base.Content.Origin = Anchor.BottomLeft;
|
||||||
|
|
||||||
ScaledContent.AddRange(new Drawable[]
|
base.Content.AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
explodingFruitContainer = new Container
|
explodingFruitContainer = new Container
|
||||||
{
|
{
|
||||||
|
@ -92,17 +92,17 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Miss) > endTime + h.HitWindows.HalfWindowFor(HitResult.Meh) + 50)
|
if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Miss) > endTime + h.HitWindows.HalfWindowFor(HitResult.Meh) + 50)
|
||||||
{
|
{
|
||||||
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
||||||
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Miss), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
||||||
}
|
}
|
||||||
else if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh) > endTime + h.HitWindows.HalfWindowFor(HitResult.Meh) + 50)
|
else if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh) > endTime + h.HitWindows.HalfWindowFor(HitResult.Meh) + 50)
|
||||||
{
|
{
|
||||||
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
||||||
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
||||||
}
|
}
|
||||||
else if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh) > endTime + h.HitWindows.HalfWindowFor(HitResult.Meh) + 50)
|
else if (h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Good) > endTime + h.HitWindows.HalfWindowFor(HitResult.Good) + 50)
|
||||||
{
|
{
|
||||||
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
if (!(prev is Spinner) && h.StartTime - endTime < 1000) AddFrameToReplay(new OsuReplayFrame(endTime + h.HitWindows.HalfWindowFor(HitResult.Good), new Vector2(prev.StackedEndPosition.X, prev.StackedEndPosition.Y)));
|
||||||
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Meh), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
if (!(h is Spinner)) AddFrameToReplay(new OsuReplayFrame(h.StartTime - h.HitWindows.HalfWindowFor(HitResult.Good), new Vector2(h.StackedPosition.X, h.StackedPosition.Y)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
{
|
{
|
||||||
new ReplayState<OsuAction>
|
new ReplayState<OsuAction>
|
||||||
{
|
{
|
||||||
Mouse = new ReplayMouseState(ToScreenSpace(Position ?? Vector2.Zero)),
|
Mouse = new ReplayMouseState(GamefieldToScreenSpace(Position ?? Vector2.Zero)),
|
||||||
PressedActions = CurrentFrame.Actions
|
PressedActions = CurrentFrame.Actions
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -122,7 +122,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
Direction = direction;
|
Direction = direction;
|
||||||
|
|
||||||
Padding = new MarginPadding(2);
|
Padding = new MarginPadding(2);
|
||||||
ScaledContent.Masking = true;
|
Content.Masking = true;
|
||||||
|
|
||||||
AddInternal(new Box
|
AddInternal(new Box
|
||||||
{
|
{
|
||||||
|
@ -81,13 +81,13 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
handleDifficulty(line);
|
handleDifficulty(line);
|
||||||
return;
|
return;
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvents(line);
|
handleEvent(line);
|
||||||
return;
|
return;
|
||||||
case Section.TimingPoints:
|
case Section.TimingPoints:
|
||||||
handleTimingPoints(line);
|
handleTimingPoint(line);
|
||||||
return;
|
return;
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
handleHitObjects(line);
|
handleHitObject(line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEvents(string line)
|
private void handleEvent(string line)
|
||||||
{
|
{
|
||||||
string[] split = line.Split(',');
|
string[] split = line.Split(',');
|
||||||
|
|
||||||
@ -275,93 +275,99 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleTimingPoints(string line)
|
private void handleTimingPoint(string line)
|
||||||
{
|
{
|
||||||
string[] split = line.Split(',');
|
try
|
||||||
|
|
||||||
double time = getOffsetTime(double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo));
|
|
||||||
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
|
||||||
double speedMultiplier = beatLength < 0 ? 100.0 / -beatLength : 1;
|
|
||||||
|
|
||||||
TimeSignatures timeSignature = TimeSignatures.SimpleQuadruple;
|
|
||||||
if (split.Length >= 3)
|
|
||||||
timeSignature = split[2][0] == '0' ? TimeSignatures.SimpleQuadruple : (TimeSignatures)int.Parse(split[2]);
|
|
||||||
|
|
||||||
LegacySampleBank sampleSet = defaultSampleBank;
|
|
||||||
if (split.Length >= 4)
|
|
||||||
sampleSet = (LegacySampleBank)int.Parse(split[3]);
|
|
||||||
|
|
||||||
//SampleBank sampleBank = SampleBank.Default;
|
|
||||||
//if (split.Length >= 5)
|
|
||||||
// sampleBank = (SampleBank)int.Parse(split[4]);
|
|
||||||
|
|
||||||
int sampleVolume = defaultSampleVolume;
|
|
||||||
if (split.Length >= 6)
|
|
||||||
sampleVolume = int.Parse(split[5]);
|
|
||||||
|
|
||||||
bool timingChange = true;
|
|
||||||
if (split.Length >= 7)
|
|
||||||
timingChange = split[6][0] == '1';
|
|
||||||
|
|
||||||
bool kiaiMode = false;
|
|
||||||
bool omitFirstBarSignature = false;
|
|
||||||
if (split.Length >= 8)
|
|
||||||
{
|
{
|
||||||
int effectFlags = int.Parse(split[7]);
|
string[] split = line.Split(',');
|
||||||
kiaiMode = (effectFlags & 1) > 0;
|
|
||||||
omitFirstBarSignature = (effectFlags & 8) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
string stringSampleSet = sampleSet.ToString().ToLower();
|
double time = getOffsetTime(double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo));
|
||||||
if (stringSampleSet == @"none")
|
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
||||||
stringSampleSet = @"normal";
|
double speedMultiplier = beatLength < 0 ? 100.0 / -beatLength : 1;
|
||||||
|
|
||||||
DifficultyControlPoint difficultyPoint = beatmap.ControlPointInfo.DifficultyPointAt(time);
|
TimeSignatures timeSignature = TimeSignatures.SimpleQuadruple;
|
||||||
SampleControlPoint samplePoint = beatmap.ControlPointInfo.SamplePointAt(time);
|
if (split.Length >= 3)
|
||||||
EffectControlPoint effectPoint = beatmap.ControlPointInfo.EffectPointAt(time);
|
timeSignature = split[2][0] == '0' ? TimeSignatures.SimpleQuadruple : (TimeSignatures)int.Parse(split[2]);
|
||||||
|
|
||||||
if (timingChange)
|
LegacySampleBank sampleSet = defaultSampleBank;
|
||||||
{
|
if (split.Length >= 4)
|
||||||
beatmap.ControlPointInfo.TimingPoints.Add(new TimingControlPoint
|
sampleSet = (LegacySampleBank)int.Parse(split[3]);
|
||||||
|
|
||||||
|
//SampleBank sampleBank = SampleBank.Default;
|
||||||
|
//if (split.Length >= 5)
|
||||||
|
// sampleBank = (SampleBank)int.Parse(split[4]);
|
||||||
|
|
||||||
|
int sampleVolume = defaultSampleVolume;
|
||||||
|
if (split.Length >= 6)
|
||||||
|
sampleVolume = int.Parse(split[5]);
|
||||||
|
|
||||||
|
bool timingChange = true;
|
||||||
|
if (split.Length >= 7)
|
||||||
|
timingChange = split[6][0] == '1';
|
||||||
|
|
||||||
|
bool kiaiMode = false;
|
||||||
|
bool omitFirstBarSignature = false;
|
||||||
|
if (split.Length >= 8)
|
||||||
{
|
{
|
||||||
Time = time,
|
int effectFlags = int.Parse(split[7]);
|
||||||
BeatLength = beatLength,
|
kiaiMode = (effectFlags & 1) > 0;
|
||||||
TimeSignature = timeSignature
|
omitFirstBarSignature = (effectFlags & 8) > 0;
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (speedMultiplier != difficultyPoint.SpeedMultiplier)
|
string stringSampleSet = sampleSet.ToString().ToLower();
|
||||||
{
|
if (stringSampleSet == @"none")
|
||||||
beatmap.ControlPointInfo.DifficultyPoints.RemoveAll(x => x.Time == time);
|
stringSampleSet = @"normal";
|
||||||
beatmap.ControlPointInfo.DifficultyPoints.Add(new DifficultyControlPoint
|
|
||||||
{
|
|
||||||
Time = time,
|
|
||||||
SpeedMultiplier = speedMultiplier
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stringSampleSet != samplePoint.SampleBank || sampleVolume != samplePoint.SampleVolume)
|
DifficultyControlPoint difficultyPoint = beatmap.ControlPointInfo.DifficultyPointAt(time);
|
||||||
{
|
SampleControlPoint samplePoint = beatmap.ControlPointInfo.SamplePointAt(time);
|
||||||
beatmap.ControlPointInfo.SamplePoints.Add(new SampleControlPoint
|
EffectControlPoint effectPoint = beatmap.ControlPointInfo.EffectPointAt(time);
|
||||||
{
|
|
||||||
Time = time,
|
|
||||||
SampleBank = stringSampleSet,
|
|
||||||
SampleVolume = sampleVolume
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kiaiMode != effectPoint.KiaiMode || omitFirstBarSignature != effectPoint.OmitFirstBarLine)
|
if (timingChange)
|
||||||
{
|
|
||||||
beatmap.ControlPointInfo.EffectPoints.Add(new EffectControlPoint
|
|
||||||
{
|
{
|
||||||
Time = time,
|
beatmap.ControlPointInfo.TimingPoints.Add(new TimingControlPoint
|
||||||
KiaiMode = kiaiMode,
|
{
|
||||||
OmitFirstBarLine = omitFirstBarSignature
|
Time = time,
|
||||||
});
|
BeatLength = beatLength,
|
||||||
|
TimeSignature = timeSignature
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (speedMultiplier != difficultyPoint.SpeedMultiplier)
|
||||||
|
{
|
||||||
|
beatmap.ControlPointInfo.DifficultyPoints.RemoveAll(x => x.Time == time);
|
||||||
|
beatmap.ControlPointInfo.DifficultyPoints.Add(new DifficultyControlPoint
|
||||||
|
{
|
||||||
|
Time = time,
|
||||||
|
SpeedMultiplier = speedMultiplier
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stringSampleSet != samplePoint.SampleBank || sampleVolume != samplePoint.SampleVolume)
|
||||||
|
{
|
||||||
|
beatmap.ControlPointInfo.SamplePoints.Add(new SampleControlPoint
|
||||||
|
{
|
||||||
|
Time = time,
|
||||||
|
SampleBank = stringSampleSet,
|
||||||
|
SampleVolume = sampleVolume
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kiaiMode != effectPoint.KiaiMode || omitFirstBarSignature != effectPoint.OmitFirstBarLine)
|
||||||
|
{
|
||||||
|
beatmap.ControlPointInfo.EffectPoints.Add(new EffectControlPoint
|
||||||
|
{
|
||||||
|
Time = time,
|
||||||
|
KiaiMode = kiaiMode,
|
||||||
|
OmitFirstBarLine = omitFirstBarSignature
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (FormatException e)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleHitObjects(string line)
|
private void handleHitObject(string line)
|
||||||
{
|
{
|
||||||
// If the ruleset wasn't specified, assume the osu!standard ruleset.
|
// If the ruleset wasn't specified, assume the osu!standard ruleset.
|
||||||
if (parser == null)
|
if (parser == null)
|
||||||
|
@ -13,9 +13,9 @@ namespace osu.Game.Input.Handlers
|
|||||||
public abstract class ReplayInputHandler : InputHandler
|
public abstract class ReplayInputHandler : InputHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A function provided to convert replay coordinates from gamefield to screen space.
|
/// A function that converts coordinates from gamefield to screen space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<Vector2, Vector2> ToScreenSpace { protected get; set; }
|
public Func<Vector2, Vector2> GamefieldToScreenSpace { protected get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the current frame based on an incoming time value.
|
/// Update the current frame based on an incoming time value.
|
||||||
|
@ -290,7 +290,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
base.SetReplay(replay);
|
base.SetReplay(replay);
|
||||||
|
|
||||||
if (ReplayInputManager?.ReplayInputHandler != null)
|
if (ReplayInputManager?.ReplayInputHandler != null)
|
||||||
ReplayInputManager.ReplayInputHandler.ToScreenSpace = input => Playfield.ScaledContent.ToScreenSpace(input);
|
ReplayInputManager.ReplayInputHandler.GamefieldToScreenSpace = Playfield.GamefieldToScreenSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
@ -12,13 +13,16 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ScalableContainer : Container
|
public class ScalableContainer : Container
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A function that converts coordinates from gamefield to screen space.
|
||||||
|
/// </summary>
|
||||||
|
public Func<Vector2, Vector2> GamefieldToScreenSpace => scaledContent.GamefieldToScreenSpace;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The scaled content.
|
/// The scaled content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Container ScaledContent;
|
private readonly ScaledContainer scaledContent;
|
||||||
|
protected override Container<Drawable> Content => scaledContent;
|
||||||
protected override Container<Drawable> Content => content;
|
|
||||||
private readonly Container content;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="Container"/> which can have its internal coordinate system scaled to a specific size.
|
/// A <see cref="Container"/> which can have its internal coordinate system scaled to a specific size.
|
||||||
@ -31,17 +35,21 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </param>
|
/// </param>
|
||||||
public ScalableContainer(float? customWidth = null, float? customHeight = null)
|
public ScalableContainer(float? customWidth = null, float? customHeight = null)
|
||||||
{
|
{
|
||||||
AddInternal(ScaledContent = new ScaledContainer
|
AddInternal(scaledContent = new ScaledContainer
|
||||||
{
|
{
|
||||||
CustomWidth = customWidth,
|
CustomWidth = customWidth,
|
||||||
CustomHeight = customHeight,
|
CustomHeight = customHeight,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = content = new Container { RelativeSizeAxes = Axes.Both }
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ScaledContainer : Container
|
private class ScaledContainer : Container
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A function that converts coordinates from gamefield to screen space.
|
||||||
|
/// </summary>
|
||||||
|
public Func<Vector2, Vector2> GamefieldToScreenSpace => content.ToScreenSpace;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The value to scale the width of the content to match.
|
/// The value to scale the width of the content to match.
|
||||||
/// If null, <see cref="CustomHeight"/> is used.
|
/// If null, <see cref="CustomHeight"/> is used.
|
||||||
@ -54,6 +62,22 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public float? CustomHeight;
|
public float? CustomHeight;
|
||||||
|
|
||||||
|
private readonly Container content;
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
public ScaledContainer()
|
||||||
|
{
|
||||||
|
AddInternal(content = new Container { RelativeSizeAxes = Axes.Both });
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
content.Scale = sizeScale;
|
||||||
|
content.Size = Vector2.Divide(Vector2.One, sizeScale);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The scale that is required for the size of the content to match <see cref="CustomWidth"/> and <see cref="CustomHeight"/>.
|
/// The scale that is required for the size of the content to match <see cref="CustomWidth"/> and <see cref="CustomHeight"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -70,17 +94,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
return Vector2.One;
|
return Vector2.One;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Scale the content to the required container size by multiplying by <see cref="sizeScale"/>.
|
|
||||||
/// </summary>
|
|
||||||
protected override Vector2 DrawScale => sizeScale * base.DrawScale;
|
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
RelativeChildSize = new Vector2(CustomWidth.HasValue ? sizeScale.X : RelativeChildSize.X, CustomHeight.HasValue ? sizeScale.Y : RelativeChildSize.Y);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,12 +83,19 @@ namespace osu.Game.Screens.Play
|
|||||||
private void load(AudioManager audio, APIAccess api, OsuConfigManager config)
|
private void load(AudioManager audio, APIAccess api, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
this.api = api;
|
this.api = api;
|
||||||
|
|
||||||
|
WorkingBeatmap working = Beatmap.Value;
|
||||||
|
if (working is DummyWorkingBeatmap)
|
||||||
|
{
|
||||||
|
Exit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
||||||
|
|
||||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||||
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
||||||
|
|
||||||
WorkingBeatmap working = Beatmap.Value;
|
|
||||||
Beatmap beatmap;
|
Beatmap beatmap;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -92,7 +92,7 @@ namespace osu.Game.Skinning
|
|||||||
string lastPiece = filename.Split('/').Last();
|
string lastPiece = filename.Split('/').Last();
|
||||||
|
|
||||||
var file = source.Files.FirstOrDefault(f =>
|
var file = source.Files.FirstOrDefault(f =>
|
||||||
string.Equals(hasExtension ? f.Filename : Path.GetFileNameWithoutExtension(f.Filename), lastPiece, StringComparison.InvariantCultureIgnoreCase));
|
string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), lastPiece, StringComparison.InvariantCultureIgnoreCase));
|
||||||
return file?.FileInfo.StoragePath;
|
return file?.FileInfo.StoragePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user