mirror of https://github.com/ppy/osu
Fix taiko playfield looking weird with new editor toolbox displays
This commit is contained in:
parent
e37d415c6f
commit
68e8819f3b
|
@ -7,6 +7,7 @@
|
|||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Taiko.UI;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Rulesets.UI.Scrolling;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Edit
|
||||
|
@ -20,6 +21,8 @@ public DrawableTaikoEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyLi
|
|||
{
|
||||
}
|
||||
|
||||
protected override Playfield CreatePlayfield() => new TaikoEditorPlayfield();
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Taiko.UI;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Edit
|
||||
{
|
||||
public partial class TaikoEditorPlayfield : TaikoPlayfield
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
// This is the simplest way to extend the taiko playfield beyond the left of the drum area.
|
||||
// Required in the editor to not look weird underneath left toolbox area.
|
||||
AddInternal(new SkinnableDrawable(new TaikoSkinComponentLookup(TaikoSkinComponents.PlayfieldBackgroundRight), _ => new PlayfieldBackgroundRight())
|
||||
{
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopRight,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -303,8 +303,8 @@ protected override void Update()
|
|||
PlayfieldContentContainer.Anchor = Anchor.CentreLeft;
|
||||
PlayfieldContentContainer.Origin = Anchor.CentreLeft;
|
||||
|
||||
PlayfieldContentContainer.Width = Math.Max(1024, DrawWidth) - (TOOLBOX_CONTRACTED_SIZE_LEFT + TOOLBOX_CONTRACTED_SIZE_RIGHT);
|
||||
PlayfieldContentContainer.X = TOOLBOX_CONTRACTED_SIZE_LEFT;
|
||||
PlayfieldContentContainer.Width = Math.Max(1024, DrawWidth);
|
||||
PlayfieldContentContainer.X = LeftToolbox.DrawWidth;
|
||||
}
|
||||
|
||||
composerFocusMode.Value = PlayfieldContentContainer.Contains(InputManager.CurrentState.Mouse.Position)
|
||||
|
|
Loading…
Reference in New Issue