mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:47:46 +08:00
Fix osu!taiko editor playfield missing a piece
Regressed with recent centering changes in https://github.com/ppy/osu/pull/24220
This commit is contained in:
parent
0b5be51ee0
commit
deba6e2508
@ -11,6 +11,8 @@ namespace osu.Game.Rulesets.Taiko.Edit
|
||||
{
|
||||
public partial class TaikoHitObjectComposer : HitObjectComposer<TaikoHitObject>
|
||||
{
|
||||
protected override bool ApplyVerticalCentering => false;
|
||||
|
||||
public TaikoHitObjectComposer(TaikoRuleset ruleset)
|
||||
: base(ruleset)
|
||||
{
|
||||
|
@ -44,6 +44,11 @@ namespace osu.Game.Rulesets.Edit
|
||||
public abstract partial class HitObjectComposer<TObject> : HitObjectComposer, IPlacementHandler
|
||||
where TObject : HitObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the playfield should be centered vertically. Should be disabled for playfields which span the full horizontal width.
|
||||
/// </summary>
|
||||
protected virtual bool ApplyVerticalCentering => true;
|
||||
|
||||
protected IRulesetConfigManager Config { get; private set; }
|
||||
|
||||
// Provides `Playfield`
|
||||
@ -242,7 +247,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
base.Update();
|
||||
|
||||
// Ensure that the playfield is always centered but also doesn't get cut off by toolboxes.
|
||||
PlayfieldContentContainer.Width = Math.Max(1024, DrawWidth) - TOOLBOX_CONTRACTED_SIZE_RIGHT * 2;
|
||||
PlayfieldContentContainer.Width = Math.Max(1024, DrawWidth) - (ApplyVerticalCentering ? TOOLBOX_CONTRACTED_SIZE_RIGHT : TOOLBOX_CONTRACTED_SIZE_LEFT) * 2;
|
||||
}
|
||||
|
||||
public override Playfield Playfield => drawableRulesetWrapper.Playfield;
|
||||
|
Loading…
Reference in New Issue
Block a user