mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:47:20 +08:00
Merge branch 'master' into break-overlay-double-parallax
This commit is contained in:
commit
83ca3053c5
@ -25,9 +25,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
||||
PatternType lastStair, IBeatmap originalBeatmap)
|
||||
: base(random, hitObject, beatmap, previousPattern, originalBeatmap)
|
||||
{
|
||||
if (previousTime > hitObject.StartTime) throw new ArgumentOutOfRangeException(nameof(previousTime));
|
||||
if (density < 0) throw new ArgumentOutOfRangeException(nameof(density));
|
||||
|
||||
StairType = lastStair;
|
||||
|
||||
TimingControlPoint timingPoint = beatmap.ControlPointInfo.TimingPointAt(hitObject.StartTime);
|
||||
|
@ -351,7 +351,11 @@ namespace osu.Game.Beatmaps
|
||||
// let's make sure there are actually .osu files to import.
|
||||
string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu"));
|
||||
if (string.IsNullOrEmpty(mapName))
|
||||
throw new InvalidOperationException($"No beatmap files found in this beatmap archive ({reader.Name}).");
|
||||
{
|
||||
// Todo: This is temporary for debugging purposes
|
||||
var files = reader.Filenames.ToList();
|
||||
throw new InvalidOperationException($"No beatmap files found in this beatmap archive. Files ({files.Count}): {string.Join(", ", files)}");
|
||||
}
|
||||
|
||||
Beatmap beatmap;
|
||||
using (var stream = new StreamReader(reader.GetStream(mapName)))
|
||||
|
@ -55,11 +55,11 @@ namespace osu.Game.Beatmaps.Formats
|
||||
} while (line != null && line.Length == 0);
|
||||
|
||||
if (line == null)
|
||||
throw new IOException(@"Unknown file format");
|
||||
throw new IOException(@"Unknown file format (null)");
|
||||
|
||||
var decoder = typedDecoders.Select(d => line.StartsWith(d.Key) ? d.Value : null).FirstOrDefault();
|
||||
var decoder = typedDecoders.Select(d => line.StartsWith(d.Key, StringComparison.InvariantCulture) ? d.Value : null).FirstOrDefault();
|
||||
if (decoder == null)
|
||||
throw new IOException(@"Unknown file format");
|
||||
throw new IOException($@"Unknown file format ({line})");
|
||||
|
||||
return (Decoder<T>)decoder.Invoke(line);
|
||||
}
|
||||
|
@ -96,8 +96,7 @@ namespace osu.Game.Overlays
|
||||
base.LoadComplete();
|
||||
|
||||
StateChanged += _ => updateProcessingMode();
|
||||
OverlayActivationMode.ValueChanged += _ => updateProcessingMode();
|
||||
OverlayActivationMode.TriggerChange();
|
||||
OverlayActivationMode.BindValueChanged(_ => updateProcessingMode(), true);
|
||||
}
|
||||
|
||||
private int totalCount => sections.Select(c => c.DisplayedCount).Sum();
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics.Shaders;
|
||||
using osu.Game.Screens.Menu;
|
||||
using OpenTK;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Screens
|
||||
{
|
||||
@ -18,6 +19,8 @@ namespace osu.Game.Screens
|
||||
|
||||
protected override bool HideOverlaysOnEnter => true;
|
||||
|
||||
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
||||
|
||||
protected override bool AllowBackButton => false;
|
||||
|
||||
public Loader()
|
||||
|
@ -174,6 +174,9 @@ namespace osu.Game.Screens.Menu
|
||||
ButtonSystemState lastState = state;
|
||||
state = value;
|
||||
|
||||
if (game != null)
|
||||
game.OverlayActivationMode.Value = state == ButtonSystemState.Exit ? OverlayActivation.Disabled : OverlayActivation.All;
|
||||
|
||||
updateLogoState(lastState);
|
||||
|
||||
Logger.Log($"{nameof(ButtonSystem)}'s state changed from {lastState} to {state}");
|
||||
@ -205,11 +208,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
logoTracking = false;
|
||||
|
||||
if (game != null)
|
||||
{
|
||||
game.OverlayActivationMode.Value = state == ButtonSystemState.Exit ? OverlayActivation.Disabled : OverlayActivation.All;
|
||||
game.Toolbar.Hide();
|
||||
}
|
||||
game?.Toolbar.Hide();
|
||||
|
||||
logo.ClearTransforms(targetMember: nameof(Position));
|
||||
logo.RelativePositionAxes = Axes.Both;
|
||||
@ -243,11 +242,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (impact)
|
||||
logo.Impact();
|
||||
|
||||
if (game != null)
|
||||
{
|
||||
game.OverlayActivationMode.Value = OverlayActivation.All;
|
||||
game.Toolbar.State = Visibility.Visible;
|
||||
}
|
||||
game?.Toolbar.Show();
|
||||
}, 200);
|
||||
break;
|
||||
default:
|
||||
|
@ -85,12 +85,10 @@ namespace osu.Game.Skinning
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||
beatmapSkins.ValueChanged += val => onSourceChanged();
|
||||
beatmapSkins.TriggerChange();
|
||||
beatmapSkins.BindValueChanged(_ => onSourceChanged());
|
||||
|
||||
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||
beatmapHitsounds.ValueChanged += val => onSourceChanged();
|
||||
beatmapHitsounds.TriggerChange();
|
||||
beatmapHitsounds.BindValueChanged(_ => onSourceChanged(), true);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
@ -52,5 +52,13 @@ namespace osu.Game.Skinning
|
||||
protected virtual void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
if (skin != null)
|
||||
skin.SourceChanged -= onChange;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user