1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Fix up sizing issues.

This commit is contained in:
smoogipooo 2017-08-09 10:54:00 +09:00
parent a95ee7494f
commit 27e63eb7c4
6 changed files with 31 additions and 6 deletions

@ -1 +1 @@
Subproject commit dd0daafcfc0d625bb588c8e12d7db58bc00c255e
Subproject commit 3b858d078cf54465d9af8e2bb9e1a144bcfcdbf4

View File

@ -8,13 +8,14 @@ using OpenTK;
using osu.Game.Rulesets.Objects.Drawables;
using System;
using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
using osu.Game.Rulesets.Taiko.Judgements;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
/// <summary>
/// A line that scrolls alongside hit objects in the playfield and visualises control points.
/// </summary>
public class DrawableBarLine : DrawableTaikoHitObject<BarLine>
public class DrawableBarLine : DrawableScrollingHitObject<TaikoHitObject, TaikoJudgement>
{
/// <summary>
/// The width of the line tracker.
@ -41,6 +42,9 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
BarLine = barLine;
Anchor = Anchor.CentreLeft;
Origin = Anchor.Centre;
RelativeSizeAxes = Axes.Y;
Width = tracker_width;
@ -57,7 +61,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
};
}
protected override TaikoPiece CreateMainPiece() => new TaikoPiece();
protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
protected override void UpdateState(ArmedState state)
{

View File

@ -32,9 +32,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll)
{
RelativeSizeAxes = Axes.Y;
AutoSizeAxes = Axes.X;
Width = (float)HitObject.Duration;
Container<DrawableDrumRollTick> tickContainer;

View File

@ -18,6 +18,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
FillMode = FillMode.Fit;
}
protected override void LoadComplete()
{
base.LoadComplete();
// We need to set this here because RelativeSizeAxes won't/can't set our size by default with a different RelativeChildSize
Width *= Parent.RelativeChildSize.X;
}
protected override TaikoPiece CreateMainPiece() => new TickPiece
{
Filled = HitObject.FirstTick

View File

@ -29,6 +29,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
FillMode = FillMode.Fit;
}
protected override void LoadComplete()
{
base.LoadComplete();
// We need to set this here because RelativeSizeAxes won't/can't set our size by default with a different RelativeChildSize
Width *= Parent.RelativeChildSize.X;
}
protected override void CheckJudgement(bool userTriggered)
{
if (!userTriggered)

View File

@ -128,6 +128,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
targetRing.BorderColour = colours.YellowDark.Opacity(0.25f);
}
protected override void LoadComplete()
{
base.LoadComplete();
// We need to set this here because RelativeSizeAxes won't/can't set our size by default with a different RelativeChildSize
Width *= Parent.RelativeChildSize.X;
}
protected override void CheckJudgement(bool userTriggered)
{
if (userTriggered)