1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 23:23:30 +08:00

Merge branch 'master' into builder

This commit is contained in:
Dean Herbert 2017-02-14 08:35:38 +09:00 committed by GitHub
commit bad501c018
47 changed files with 326 additions and 95 deletions

@ -1 +1 @@
Subproject commit eae237f6a7e2a6e7d7c621b2382bb08de2b470b8
Subproject commit 1cd7a165ec42cd1eeb4eee06b5a4a6cdd8c280da

@ -1 +1 @@
Subproject commit 2a3dd3f3dd68fe52b779d0fdded3ce444897efee
Subproject commit 51f2b9b37f38cd349a3dd728a78f8fffcb3a54f5

View File

@ -71,7 +71,7 @@ namespace osu.Desktop.VisualTests.Tests
Add(flow = new FlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly
Direction = FlowDirections.Vertical
});
SpriteText loading;

View File

@ -20,27 +20,22 @@ namespace osu.Desktop.Beatmaps.IO
public static void Register() => AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
private string basePath { get; set; }
private string[] beatmaps { get; set; }
private Beatmap firstMap { get; set; }
public LegacyFilesystemReader(string path)
{
basePath = path;
beatmaps = Directory.GetFiles(basePath, @"*.osu").Select(f => Path.GetFileName(f)).ToArray();
if (beatmaps.Length == 0)
BeatmapFilenames = Directory.GetFiles(basePath, @"*.osu").Select(f => Path.GetFileName(f)).ToArray();
if (BeatmapFilenames.Length == 0)
throw new FileNotFoundException(@"This directory contains no beatmaps");
using (var stream = new StreamReader(GetStream(beatmaps[0])))
StoryboardFilename = Directory.GetFiles(basePath, @"*.osb").Select(f => Path.GetFileName(f)).FirstOrDefault();
using (var stream = new StreamReader(GetStream(BeatmapFilenames[0])))
{
var decoder = BeatmapDecoder.GetDecoder(stream);
firstMap = decoder.Decode(stream);
}
}
public override string[] ReadBeatmaps()
{
return beatmaps;
}
public override Stream GetStream(string name)
{
return File.OpenRead(Path.Combine(basePath, name));

View File

@ -0,0 +1,21 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects;
using System.Collections.Generic;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
{
/// <summary>
/// Connects hit objects visually, for example with follow points.
/// </summary>
public abstract class ConnectionRenderer<T> : Container
where T : HitObject
{
/// <summary>
/// Hit objects to create connections for
/// </summary>
public abstract IEnumerable<T> HitObjects { get; set; }
}
}

View File

@ -0,0 +1,67 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Game.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
{
public class FollowPoint : Container
{
public double StartTime;
public double EndTime;
public Vector2 EndPosition;
const float width = 8;
public FollowPoint()
{
Origin = Anchor.Centre;
Alpha = 0;
Masking = true;
AutoSizeAxes = Axes.Both;
CornerRadius = width / 2;
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
};
Children = new Drawable[]
{
new Box
{
Size = new Vector2(width),
BlendingMode = BlendingMode.Additive,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = 0.5f,
},
};
}
protected override void LoadComplete()
{
base.LoadComplete();
Delay(StartTime);
FadeIn(DrawableOsuHitObject.TIME_FADEIN);
ScaleTo(1.5f);
ScaleTo(1, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
MoveTo(EndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
Delay(EndTime - StartTime);
FadeOut(DrawableOsuHitObject.TIME_FADEIN);
Delay(DrawableOsuHitObject.TIME_FADEIN);
Expire(true);
}
}
}

View File

@ -0,0 +1,97 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Game.Modes.Osu.Objects.Drawables.Connections;
using System;
using System.Collections.Generic;
namespace osu.Game.Modes.Osu.Objects.Drawables
{
public class FollowPointRenderer : ConnectionRenderer<OsuHitObject>
{
private int pointDistance = 32;
/// <summary>
/// Determines how much space there is between points.
/// </summary>
public int PointDistance
{
get { return pointDistance; }
set
{
if (pointDistance == value) return;
pointDistance = value;
update();
}
}
private int preEmpt = 800;
/// <summary>
/// Follow points to the next hitobject start appearing for this many milliseconds before an hitobject's end time.
/// </summary>
public int PreEmpt
{
get { return preEmpt; }
set
{
if (preEmpt == value) return;
preEmpt = value;
update();
}
}
private IEnumerable<OsuHitObject> hitObjects;
public override IEnumerable<OsuHitObject> HitObjects
{
get { return hitObjects; }
set
{
hitObjects = value;
update();
}
}
private void update()
{
Clear();
if (hitObjects == null)
return;
OsuHitObject prevHitObject = null;
foreach (var currHitObject in hitObjects)
{
if (prevHitObject != null && !currHitObject.NewCombo && !(prevHitObject is Spinner) && !(currHitObject is Spinner))
{
Vector2 startPosition = prevHitObject.EndPosition;
Vector2 endPosition = currHitObject.Position;
double startTime = prevHitObject.EndTime;
double endTime = currHitObject.StartTime;
Vector2 distanceVector = endPosition - startPosition;
int distance = (int)distanceVector.Length;
float rotation = (float)Math.Atan2(distanceVector.Y, distanceVector.X);
double duration = endTime - startTime;
for (int d = (int)(PointDistance * 1.5); d < distance - PointDistance; d += PointDistance)
{
float fraction = ((float)d / distance);
Vector2 pointStartPosition = startPosition + (fraction - 0.1f) * distanceVector;
Vector2 pointEndPosition = startPosition + fraction * distanceVector;
double fadeOutTime = startTime + fraction * duration;
double fadeInTime = fadeOutTime - PreEmpt;
Add(new FollowPoint()
{
StartTime = fadeInTime,
EndTime = fadeOutTime,
Position = pointStartPosition,
EndPosition = pointEndPosition,
Rotation = rotation,
});
}
}
prevHitObject = currHitObject;
}
}
}
}

View File

@ -24,7 +24,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
Spacing = new Vector2(0, 2);
Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset;

View File

@ -1,13 +1,15 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Connections;
using osu.Game.Modes.UI;
using OpenTK;
using System.Linq;
namespace osu.Game.Modes.Osu.UI
{
@ -15,6 +17,7 @@ namespace osu.Game.Modes.Osu.UI
{
private Container approachCircles;
private Container judgementLayer;
private ConnectionRenderer<OsuHitObject> connectionLayer;
public override Vector2 Size
{
@ -36,6 +39,11 @@ namespace osu.Game.Modes.Osu.UI
Add(new Drawable[]
{
connectionLayer = new FollowPointRenderer
{
RelativeSizeAxes = Axes.Both,
Depth = 2,
},
judgementLayer = new Container
{
RelativeSizeAxes = Axes.Both,
@ -63,6 +71,13 @@ namespace osu.Game.Modes.Osu.UI
base.Add(h);
}
public override void PostProcess()
{
connectionLayer.HitObjects = HitObjects.Children
.Select(d => (OsuHitObject)d.HitObject)
.OrderBy(h => h.StartTime);
}
private void judgement(DrawableHitObject h, JudgementInfo j)
{
HitExplosion explosion = new HitExplosion((OsuJudgementInfo)j, (OsuHitObject)h.HitObject);

View File

@ -46,9 +46,12 @@
<Compile Include="Objects\BezierApproximator.cs" />
<Compile Include="Objects\CircularArcApproximator.cs" />
<Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" />
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
<Compile Include="Objects\Drawables\DrawableSlider.cs" />
<Compile Include="Objects\Drawables\Connections\FollowPoint.cs" />
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />

View File

@ -39,7 +39,7 @@ namespace osu.Game.Tests.Beatmaps.IO
"Soleily - Renatus (MMzz) [Muzukashii].osu",
"Soleily - Renatus (MMzz) [Oni].osu"
};
var maps = reader.ReadBeatmaps();
var maps = reader.BeatmapFilenames;
foreach (var map in expected)
Assert.Contains(map, maps);
}

View File

@ -77,7 +77,7 @@ namespace osu.Game.Beatmaps.Drawables
new FlowContainer
{
Padding = new MarginPadding(5),
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
@ -93,13 +93,13 @@ namespace osu.Game.Beatmaps.Drawables
{
Padding = new MarginPadding { Left = 5 },
Spacing = new Vector2(0, 5),
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(4, 0),
Children = new[]

View File

@ -39,7 +39,7 @@ namespace osu.Game.Beatmaps.Drawables
},
new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 },
AutoSizeAxes = Axes.Both,
Children = new[]
@ -113,7 +113,7 @@ namespace osu.Game.Beatmaps.Drawables
new FlowContainer
{
Depth = -1,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Both,
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
Shear = new Vector2(0.8f, 0),

View File

@ -7,6 +7,8 @@ using System.IO;
using osu.Game.Modes.Objects;
using OpenTK.Graphics;
using osu.Game.Graphics;
using osu.Game.Beatmaps.Timing;
using osu.Game.Database;
namespace osu.Game.Beatmaps.Formats
{
@ -34,6 +36,11 @@ namespace osu.Game.Beatmaps.Formats
return b;
}
public virtual void Decode(TextReader stream, Beatmap beatmap)
{
ParseFile(stream, beatmap);
}
public virtual Beatmap Process(Beatmap beatmap)
{
ApplyColours(beatmap);
@ -41,7 +48,23 @@ namespace osu.Game.Beatmaps.Formats
return beatmap;
}
protected abstract Beatmap ParseFile(TextReader stream);
protected virtual Beatmap ParseFile(TextReader stream)
{
var beatmap = new Beatmap
{
HitObjects = new List<HitObject>(),
ControlPoints = new List<ControlPoint>(),
ComboColors = new List<Color4>(),
BeatmapInfo = new BeatmapInfo
{
Metadata = new BeatmapMetadata(),
BaseDifficulty = new BaseDifficulty(),
},
};
ParseFile(stream, beatmap);
return beatmap;
}
protected abstract void ParseFile(TextReader stream, Beatmap beatmap);
public virtual void ApplyColours(Beatmap b)
{

View File

@ -12,7 +12,7 @@ namespace osu.Game.Beatmaps.Formats
{
public class ConstructableBeatmapDecoder : BeatmapDecoder
{
protected override Beatmap ParseFile(TextReader stream)
protected override void ParseFile(TextReader stream, Beatmap beatmap)
{
throw new NotImplementedException();
}

View File

@ -233,20 +233,8 @@ namespace osu.Game.Beatmaps.Formats
});
}
protected override Beatmap ParseFile(TextReader stream)
protected override void ParseFile(TextReader stream, Beatmap beatmap)
{
var beatmap = new Beatmap
{
HitObjects = new List<HitObject>(),
ControlPoints = new List<ControlPoint>(),
ComboColors = new List<Color4>(),
BeatmapInfo = new BeatmapInfo
{
Metadata = new BeatmapMetadata(),
BaseDifficulty = new BaseDifficulty(),
},
};
HitObjectParser parser = null;
var section = Section.None;
@ -309,8 +297,6 @@ namespace osu.Game.Beatmaps.Formats
break;
}
}
return beatmap;
}
}
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps.IO
}
private static List<Reader> readers { get; } = new List<Reader>();
public static ArchiveReader GetReader(BasicStorage storage, string path)
{
foreach (var reader in readers)
@ -29,20 +29,27 @@ namespace osu.Game.Beatmaps.IO
}
throw new IOException(@"Unknown file format");
}
protected static void AddReader<T>(Func<BasicStorage, string, bool> test) where T : ArchiveReader
{
readers.Add(new Reader { Test = test, Type = typeof(T) });
}
/// <summary>
/// Reads the beatmap metadata from this archive.
/// </summary>
public abstract BeatmapMetadata ReadMetadata();
/// <summary>
/// Gets a list of beatmap file names.
/// </summary>
public abstract string[] ReadBeatmaps();
public string[] BeatmapFilenames { get; protected set; }
/// <summary>
/// The storyboard filename. Null if no storyboard is present.
/// </summary>
public string StoryboardFilename { get; protected set; }
/// <summary>
/// Opens a stream for reading a specific file from this archive.
/// </summary>

View File

@ -25,29 +25,25 @@ namespace osu.Game.Beatmaps.IO
private Stream archiveStream;
private ZipFile archive;
private string[] beatmaps;
private Beatmap firstMap;
public OszArchiveReader(Stream archiveStream)
{
this.archiveStream = archiveStream;
archive = ZipFile.Read(archiveStream);
beatmaps = archive.Entries.Where(e => e.FileName.EndsWith(@".osu"))
BeatmapFilenames = archive.Entries.Where(e => e.FileName.EndsWith(@".osu"))
.Select(e => e.FileName).ToArray();
if (beatmaps.Length == 0)
if (BeatmapFilenames.Length == 0)
throw new FileNotFoundException(@"This directory contains no beatmaps");
using (var stream = new StreamReader(GetStream(beatmaps[0])))
StoryboardFilename = archive.Entries.Where(e => e.FileName.EndsWith(@".osb"))
.Select(e => e.FileName).FirstOrDefault();
using (var stream = new StreamReader(GetStream(BeatmapFilenames[0])))
{
var decoder = BeatmapDecoder.GetDecoder(stream);
firstMap = decoder.Decode(stream);
}
}
public override string[] ReadBeatmaps()
{
return beatmaps;
}
public override Stream GetStream(string name)
{
ZipEntry entry = archive.Entries.SingleOrDefault(e => e.FileName == name);

View File

@ -18,6 +18,8 @@ namespace osu.Game.Beatmaps
public readonly BeatmapSetInfo BeatmapSetInfo;
private readonly BeatmapDatabase database;
public readonly bool WithStoryboard;
private ArchiveReader getReader() => database?.GetReader(BeatmapSetInfo);
private Texture background;
@ -58,8 +60,19 @@ namespace osu.Game.Beatmaps
try
{
using (var reader = getReader())
using (var stream = new StreamReader(reader.GetStream(BeatmapInfo.Path)))
beatmap = BeatmapDecoder.GetDecoder(stream)?.Decode(stream);
{
BeatmapDecoder decoder;
using (var stream = new StreamReader(reader.GetStream(BeatmapInfo.Path)))
{
decoder = BeatmapDecoder.GetDecoder(stream);
beatmap = decoder?.Decode(stream);
}
if (WithStoryboard && beatmap != null && BeatmapSetInfo.StoryboardFile != null)
using (var stream = new StreamReader(reader.GetStream(BeatmapSetInfo.StoryboardFile)))
decoder?.Decode(stream, beatmap);
}
}
catch { }
@ -103,11 +116,12 @@ namespace osu.Game.Beatmaps
this.beatmap = beatmap;
}
public WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, BeatmapDatabase database)
public WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, BeatmapDatabase database, bool withStoryboard = false)
{
BeatmapInfo = beatmapInfo;
BeatmapSetInfo = beatmapSetInfo;
this.database = database;
this.WithStoryboard = withStoryboard;
}
private bool isDisposed;

View File

@ -125,7 +125,7 @@ namespace osu.Game.Database
using (var reader = ArchiveReader.GetReader(storage, path))
{
string[] mapNames = reader.ReadBeatmaps();
string[] mapNames = reader.BeatmapFilenames;
foreach (var name in mapNames)
{
using (var stream = new StreamReader(reader.GetStream(name)))
@ -139,6 +139,7 @@ namespace osu.Game.Database
beatmapSet.Beatmaps.Add(beatmap.BeatmapInfo);
}
beatmapSet.StoryboardFile = reader.StoryboardFilename;
}
}
@ -171,7 +172,7 @@ namespace osu.Game.Database
return Query<BeatmapSetInfo>().FirstOrDefault(s => s.OnlineBeatmapSetID == id);
}
public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo, WorkingBeatmap previous = null)
public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo, WorkingBeatmap previous = null, bool withStoryboard = false)
{
var beatmapSetInfo = Query<BeatmapSetInfo>().FirstOrDefault(s => s.ID == beatmapInfo.BeatmapSetInfoID);
@ -184,7 +185,7 @@ namespace osu.Game.Database
if (beatmapInfo.Metadata == null)
beatmapInfo.Metadata = beatmapSetInfo.Metadata;
var working = new WorkingBeatmap(beatmapInfo, beatmapSetInfo, this);
var working = new WorkingBeatmap(beatmapInfo, beatmapSetInfo, this, withStoryboard);
previous?.TransferTo(working);

View File

@ -27,6 +27,8 @@ namespace osu.Game.Database
public string Hash { get; set; }
public string Path { get; set; }
public string StoryboardFile { get; set; }
}
}

View File

@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
{
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]

View File

@ -83,6 +83,7 @@ namespace osu.Game.Modes.UI
Playfield.Add(drawableObject);
}
Playfield.PostProcess();
}
private void onJudgement(DrawableHitObject o, JudgementInfo j) => TriggerOnJudgement(j);

View File

@ -1,10 +1,10 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects.Drawables;
using OpenTK;
namespace osu.Game.Modes.UI
{
@ -32,6 +32,10 @@ namespace osu.Game.Modes.UI
});
}
public virtual void PostProcess()
{
}
public class ScaledContainer : Container
{
protected override Vector2 DrawScale => new Vector2(DrawSize.X / 512);

View File

@ -42,7 +42,7 @@ namespace osu.Game.Online.Chat.Drawables
{
flow = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(1, 1)

View File

@ -45,7 +45,7 @@ namespace osu.Game.Overlays
{
sections = new FlowContainer<NotificationSection>
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Children = new []

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
Padding = new MarginPadding
{

View File

@ -86,7 +86,7 @@ namespace osu.Game.Overlays.Options
{
Items = new KeyValuePair<string, T>[0];
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Children = new Drawable[]

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Options
public OptionSlider()
{
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Right = 5 };

View File

@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Options
FlowContent = new FlowContainer
{
Margin = new MarginPadding { Top = header_size + header_margin },
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0, 30),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
AddInternal(new Drawable[]
{
new OsuSpriteText
@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Options
},
content = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0, 5),

View File

@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Options.Sections.General
private void load(APIAccess api, OsuConfigManager config)
{
this.api = api;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
Spacing = new Vector2(0, 5);

View File

@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Options
Anchor = Anchor.CentreLeft,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly
Direction = FlowDirections.Vertical
}
}
},

View File

@ -82,7 +82,7 @@ namespace osu.Game.Overlays
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
@ -103,7 +103,7 @@ namespace osu.Game.Overlays
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = sections,
}
}
@ -141,7 +141,7 @@ namespace osu.Game.Overlays
foreach (OptionsSection section in sections)
{
float distance = Math.Abs(scrollContainer.GetChildYInContent(section) - currentScroll);
float distance = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll);
if (distance < bestDistance)
{
bestDistance = distance;

View File

@ -104,7 +104,7 @@ namespace osu.Game.Overlays.Pause
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0f, 50f),
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
@ -113,7 +113,7 @@ namespace osu.Game.Overlays.Pause
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0f, 20f),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,

View File

@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar
new ToolbarBackground(),
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Toolbar
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]

View File

@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Toolbar
},
Flow = new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 },
@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Toolbar
},
tooltipContainer = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight,
Origin = TooltipAnchor,

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Toolbar
{
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = 10, Right = 10 },

View File

@ -126,7 +126,7 @@ namespace osu.Game.Screens
},
childModeButtons = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Both,

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Menu
new OsuSpriteText
{
Shadow = true,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 16,

View File

@ -81,7 +81,7 @@ namespace osu.Game.Screens.Menu
},
buttonFlow = new FlowContainerWithOrigin
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(-WEDGE_WIDTH, 0),

View File

@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play
{
public KeyCounterCollection()
{
Direction = FlowDirection.HorizontalOnly;
Direction = FlowDirections.Horizontal;
AutoSizeAxes = Axes.Both;
}

View File

@ -74,7 +74,7 @@ namespace osu.Game.Screens.Play
try
{
if (Beatmap == null)
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo);
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
}
catch
{
@ -237,11 +237,10 @@ namespace osu.Game.Screens.Play
{
base.LoadComplete();
Delay(250, true);
Content.Delay(250);
Content.FadeIn(250);
Delay(500, true);
Delay(750);
Schedule(() =>
{
sourceClock.Start();

View File

@ -69,7 +69,7 @@ namespace osu.Game.Screens.Ranking
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
new OsuSpriteText

View File

@ -127,7 +127,7 @@ namespace osu.Game.Screens.Select
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 },
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
@ -149,7 +149,7 @@ namespace osu.Game.Screens.Select
new FlowContainer
{
Margin = new MarginPadding { Top = 10 },
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Children = new []
{

View File

@ -43,7 +43,7 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Width = 0.4f, // TODO: InnerWidth property or something
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
searchTextBox = new SearchTextBox { RelativeSizeAxes = Axes.X },
@ -175,7 +175,7 @@ namespace osu.Game.Screens.Select
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{
@ -207,7 +207,7 @@ namespace osu.Game.Screens.Select
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(10, 0),
Origin = Anchor.TopRight,
Anchor = Anchor.TopRight,

View File

@ -94,14 +94,14 @@ namespace osu.Game.Screens.Select
Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0),
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(padding, 0),
Children = new Drawable[]
{
buttons = new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(0.2f, 0),
AutoSizeAxes = Axes.Both,
}