mirror of https://github.com/ppy/osu
Rename `LockPlayfieldAspect` and add comment explaining the change
This commit is contained in:
parent
9021cf7be6
commit
4a77105e78
|
@ -16,7 +16,7 @@ public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset<TaikoHit
|
|||
public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
|
||||
{
|
||||
drawableTaikoRuleset = (DrawableTaikoRuleset)drawableRuleset;
|
||||
drawableTaikoRuleset.LockPlayfieldAspect.Value = false;
|
||||
drawableTaikoRuleset.LockPlayfieldMaxAspect.Value = false;
|
||||
|
||||
var playfield = (TaikoPlayfield)drawableRuleset.Playfield;
|
||||
playfield.ClassicHitTargetPosition.Value = true;
|
||||
|
|
|
@ -31,7 +31,7 @@ public partial class DrawableTaikoRuleset : DrawableScrollingRuleset<TaikoHitObj
|
|||
{
|
||||
public new BindableDouble TimeRange => base.TimeRange;
|
||||
|
||||
public readonly BindableBool LockPlayfieldAspect = new BindableBool(true);
|
||||
public readonly BindableBool LockPlayfieldMaxAspect = new BindableBool(true);
|
||||
|
||||
protected override ScrollVisualisationMethod VisualisationMethod => ScrollVisualisationMethod.Overlapping;
|
||||
|
||||
|
@ -78,7 +78,7 @@ public MultiplierControlPoint ControlPointAt(double time)
|
|||
|
||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new TaikoPlayfieldAdjustmentContainer
|
||||
{
|
||||
LockPlayfieldAspect = { BindTarget = LockPlayfieldAspect }
|
||||
LockPlayfieldMaxAspect = { BindTarget = LockPlayfieldMaxAspect }
|
||||
};
|
||||
|
||||
protected override PassThroughInputManager CreateInputManager() => new TaikoInputManager(Ruleset.RulesetInfo);
|
||||
|
|
|
@ -13,7 +13,7 @@ public partial class TaikoPlayfieldAdjustmentContainer : PlayfieldAdjustmentCont
|
|||
private const float default_relative_height = TaikoPlayfield.DEFAULT_HEIGHT / 768;
|
||||
private const float default_aspect = 16f / 9f;
|
||||
|
||||
public readonly IBindable<bool> LockPlayfieldAspect = new BindableBool(true);
|
||||
public readonly IBindable<bool> LockPlayfieldMaxAspect = new BindableBool(true);
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
|
@ -21,7 +21,12 @@ protected override void Update()
|
|||
|
||||
float height = default_relative_height;
|
||||
|
||||
if (LockPlayfieldAspect.Value && Parent.ChildSize.X / Parent.ChildSize.Y > default_aspect)
|
||||
// Players coming from stable expect to be able to change the aspect ratio regardless of the window size.
|
||||
// We originally wanted to limit this more, but there was considerable pushback from the community.
|
||||
//
|
||||
// As a middle-ground, the aspect ratio can still be adjusted in the downwards direction but has a maximum limit.
|
||||
// This is still a bit weird, because readability changes with window size, but it is what it is.
|
||||
if (LockPlayfieldMaxAspect.Value && Parent.ChildSize.X / Parent.ChildSize.Y > default_aspect)
|
||||
height *= Math.Clamp(Parent.ChildSize.X / Parent.ChildSize.Y, 0.4f, 4) / default_aspect;
|
||||
|
||||
Height = height;
|
||||
|
|
Loading…
Reference in New Issue