mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Merge pull request #19832 from peppy/fix-taiko-span-blueprint-overlay
Fix taiko blueprints displaying incorrectly for drum rolls
This commit is contained in:
commit
c4dee1cf6d
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
@ -30,6 +31,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
/// </summary>
|
||||
private const int rolling_hits_for_engaged_colour = 5;
|
||||
|
||||
public override Quad ScreenSpaceDrawQuad => MainPiece.Drawable.ScreenSpaceDrawQuad;
|
||||
|
||||
/// <summary>
|
||||
/// Rolling number of tick hits. This increases for hits and decreases for misses.
|
||||
/// </summary>
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Animations;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Taiko.Objects;
|
||||
@ -20,6 +21,9 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
{
|
||||
private Drawable backgroundLayer;
|
||||
|
||||
// required for editor blueprints (not sure why these circle pieces are zero size).
|
||||
public override Quad ScreenSpaceDrawQuad => backgroundLayer.ScreenSpaceDrawQuad;
|
||||
|
||||
public LegacyCirclePiece()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
@ -6,6 +6,7 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
@ -16,11 +17,22 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
{
|
||||
public class LegacyDrumRoll : CompositeDrawable, IHasAccentColour
|
||||
{
|
||||
public override Quad ScreenSpaceDrawQuad
|
||||
{
|
||||
get
|
||||
{
|
||||
var headDrawQuad = headCircle.ScreenSpaceDrawQuad;
|
||||
var tailDrawQuad = tailCircle.ScreenSpaceDrawQuad;
|
||||
|
||||
return new Quad(headDrawQuad.TopLeft, tailDrawQuad.TopRight, headDrawQuad.BottomLeft, tailDrawQuad.BottomRight);
|
||||
}
|
||||
}
|
||||
|
||||
private LegacyCirclePiece headCircle;
|
||||
|
||||
private Sprite body;
|
||||
|
||||
private Sprite end;
|
||||
private Sprite tailCircle;
|
||||
|
||||
public LegacyDrumRoll()
|
||||
{
|
||||
@ -32,7 +44,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
end = new Sprite
|
||||
tailCircle = new Sprite
|
||||
{
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreLeft,
|
||||
@ -82,7 +94,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
|
||||
headCircle.AccentColour = colour;
|
||||
body.Colour = colour;
|
||||
end.Colour = colour;
|
||||
tailCircle.Colour = colour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user