Adjust xmldoc and rename to GetAspectAdjustedSize

This commit is contained in:
smoogipoo 2018-02-19 17:04:18 +09:00
parent ef11ce3dd1
commit cd2c9a9de6
4 changed files with 8 additions and 7 deletions

View File

@ -101,7 +101,7 @@ namespace osu.Game.Rulesets.Mania.UI
return null;
}
protected override Vector2 GetPlayfieldAspectAdjust() => new Vector2(1, 0.8f);
protected override Vector2 GetAspectAdjustedSize() => new Vector2(1, 0.8f);
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new ManiaFramedReplayInputHandler(replay, this);

View File

@ -50,7 +50,7 @@ namespace osu.Game.Rulesets.Osu.UI
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new OsuReplayInputHandler(replay);
protected override Vector2 GetPlayfieldAspectAdjust()
protected override Vector2 GetAspectAdjustedSize()
{
var aspectSize = DrawSize.X * 0.75f < DrawSize.Y ? new Vector2(DrawSize.X, DrawSize.X * 0.75f) : new Vector2(DrawSize.Y * 4f / 3f, DrawSize.Y);
return new Vector2(aspectSize.X / DrawSize.X, aspectSize.Y / DrawSize.Y) * 0.75f;

View File

@ -78,7 +78,7 @@ namespace osu.Game.Rulesets.Taiko.UI
}
}
protected override Vector2 GetPlayfieldAspectAdjust()
protected override Vector2 GetAspectAdjustedSize()
{
const float default_relative_height = TaikoPlayfield.DEFAULT_HEIGHT / 768;
const float default_aspect = 16f / 9f;

View File

@ -324,7 +324,7 @@ namespace osu.Game.Rulesets.UI
{
base.Update();
Playfield.Size = AspectAdjust ? GetPlayfieldAspectAdjust() : Vector2.One;
Playfield.Size = AspectAdjust ? GetAspectAdjustedSize() : Vector2.One;
}
/// <summary>
@ -335,10 +335,11 @@ 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 final size of the <see cref="Playfield"/> in relative coordinate space after all
/// aspect and scale 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() => new Vector2(0.75f); // A sane default
/// <summary>
/// Creates a converter to convert Beatmap to a specific mode.