mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 04:37:30 +09:00
Rename the property to "AlignWithStoryboard"
This commit is contained in:
parent
675f618b28
commit
9fb7b8f3d8
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
protected override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo);
|
protected override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo);
|
||||||
|
|
||||||
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new OsuPlayfieldAdjustmentContainer { PlayfieldShift = true };
|
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new OsuPlayfieldAdjustmentContainer { AlignWithStoryboard = true };
|
||||||
|
|
||||||
protected override ResumeOverlay CreateResumeOverlay() => new OsuResumeOverlay();
|
protected override ResumeOverlay CreateResumeOverlay() => new OsuResumeOverlay();
|
||||||
|
|
||||||
|
@ -11,16 +11,17 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
public class OsuPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
|
public class OsuPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
|
||||||
{
|
{
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
private readonly Container content;
|
private readonly ScalingContainer content;
|
||||||
|
|
||||||
private const float playfield_size_adjust = 0.8f;
|
private const float playfield_size_adjust = 0.8f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether an osu-stable playfield offset should be applied (8 osu!pixels)
|
/// When true, an offset is applied to allow alignment with historical storyboards displayed in the same parent space.
|
||||||
|
/// This will shift the playfield downwards slightly.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool PlayfieldShift
|
public bool AlignWithStoryboard
|
||||||
{
|
{
|
||||||
set => ((ScalingContainer)content).PlayfieldShift = value;
|
set => content.PlayfieldShift = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OsuPlayfieldAdjustmentContainer()
|
public OsuPlayfieldAdjustmentContainer()
|
||||||
@ -65,7 +66,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
// Scale = 819.2 / 512
|
// Scale = 819.2 / 512
|
||||||
// Scale = 1.6
|
// Scale = 1.6
|
||||||
Scale = new Vector2(Parent.ChildSize.X / OsuPlayfield.BASE_SIZE.X);
|
Scale = new Vector2(Parent.ChildSize.X / OsuPlayfield.BASE_SIZE.X);
|
||||||
Position = new Vector2(0, (PlayfieldShift ? 8f : 0f) * Parent.ChildSize.Y / OsuPlayfield.BASE_SIZE.Y);
|
Position = new Vector2(0, (PlayfieldShift ? 8f : 0f) * Scale.X);
|
||||||
// Size = 0.625
|
// Size = 0.625
|
||||||
Size = Vector2.Divide(Vector2.One, Scale);
|
Size = Vector2.Divide(Vector2.One, Scale);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user