Merge remote-tracking branch 'origin/master' into netstandard

This commit is contained in:
smoogipoo
2018-03-24 14:49:46 +09:00
465 changed files with 12513 additions and 4969 deletions

View File

@ -17,6 +17,7 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Input;
using osu.Game.Configuration;
using osu.Game.Input.Handlers;
using osu.Game.Overlays;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Replays;
@ -33,11 +34,6 @@ namespace osu.Game.Rulesets.UI
/// </summary>
public abstract class RulesetContainer : Container
{
/// <summary>
/// Whether to apply adjustments to the child <see cref="Playfield"/> based on our own size.
/// </summary>
public bool AspectAdjust = true;
/// <summary>
/// The selected variant.
/// </summary>
@ -115,7 +111,7 @@ namespace osu.Game.Rulesets.UI
/// <returns>The input manager.</returns>
public abstract PassThroughInputManager CreateInputManager();
protected virtual FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => null;
protected virtual ReplayInputHandler CreateReplayInputHandler(Replay replay) => null;
public Replay Replay { get; private set; }
@ -325,7 +321,7 @@ namespace osu.Game.Rulesets.UI
{
base.Update();
Playfield.Size = AspectAdjust ? GetPlayfieldAspectAdjust() : Vector2.One;
Playfield.Size = GetAspectAdjustedSize() * PlayfieldArea;
}
/// <summary>
@ -336,10 +332,17 @@ namespace osu.Game.Rulesets.UI
protected virtual BeatmapProcessor<TObject> CreateBeatmapProcessor() => new BeatmapProcessor<TObject>();
/// <summary>
/// In some cases we want to apply changes to the relative size of our contained <see cref="Playfield"/> based on custom conditions.
/// Computes the size of the <see cref="Playfield"/> in relative coordinate space after aspect adjustments.
/// </summary>
/// <returns></returns>
protected virtual Vector2 GetPlayfieldAspectAdjust() => new Vector2(0.75f); //a sane default
/// <returns>The aspect-adjusted size.</returns>
protected virtual Vector2 GetAspectAdjustedSize() => Vector2.One;
/// <summary>
/// The area of this <see cref="RulesetContainer"/> that is available for the <see cref="Playfield"/> to use.
/// Must be specified in relative coordinate space to this <see cref="RulesetContainer"/>.
/// This affects the final size of the <see cref="Playfield"/> but does not affect the <see cref="Playfield"/>'s scale.
/// </summary>
protected virtual Vector2 PlayfieldArea => new Vector2(0.75f); // A sane default
/// <summary>
/// Creates a converter to convert Beatmap to a specific mode.