mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 10:33:07 +08:00
Rework border + fillmodes + size in TaikoPlayfield.
This commit is contained in:
parent
17cad76054
commit
324fd456a7
@ -59,7 +59,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT,
|
||||
Height = TaikoPlayfield.DEFAULT_HEIGHT,
|
||||
Clock = new FramedClock(rateAdjustClock),
|
||||
Children = new[]
|
||||
{
|
||||
@ -100,7 +100,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
||||
break;
|
||||
case 6:
|
||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT), 500);
|
||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(TaikoPlayfield.DEFAULT_HEIGHT), 500);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
|
||||
protected override Vector2 GetPlayfieldAspectAdjust()
|
||||
{
|
||||
const float default_relative_height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT / 768;
|
||||
const float default_relative_height = TaikoPlayfield.DEFAULT_HEIGHT / 768;
|
||||
const float default_aspect = 16f / 9f;
|
||||
|
||||
float aspectAdjust = MathHelper.Clamp(DrawWidth / DrawHeight, 0.4f, 4) / default_aspect;
|
||||
|
@ -22,14 +22,14 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
/// <summary>
|
||||
/// The default play field height.
|
||||
/// Default height of a <see cref="TaikoPlayfield"/> when inside a <see cref="TaikoHitRenderer"/>.
|
||||
/// </summary>
|
||||
public const float DEFAULT_PLAYFIELD_HEIGHT = 178f;
|
||||
public const float DEFAULT_HEIGHT = 178;
|
||||
|
||||
/// <summary>
|
||||
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
|
||||
/// </summary>
|
||||
public const float HIT_TARGET_OFFSET = TaikoHitObject.DEFAULT_STRONG_CIRCLE_DIAMETER / 2f + 40;
|
||||
public const float HIT_TARGET_OFFSET = 100;
|
||||
|
||||
/// <summary>
|
||||
/// The size of the left area of the playfield. This area contains the input drum.
|
||||
@ -60,7 +60,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
Name = "Transparent playfield background",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
BorderThickness = 2,
|
||||
Masking = true,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
@ -81,7 +80,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
Name = "Right area",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Left = left_area_size },
|
||||
Padding = new MarginPadding { Left = left_area_size },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -94,7 +93,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
hitExplosionContainer = new Container<HitExplosion>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fit,
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
},
|
||||
barLineContainer = new Container<DrawableBarLine>
|
||||
@ -105,6 +105,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fit
|
||||
},
|
||||
hitObjectContainer = new Container
|
||||
{
|
||||
@ -115,7 +117,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
kiaiExplosionContainer = new Container<KiaiHitExplosion>
|
||||
{
|
||||
Name = "Kiai hit explosions",
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fit,
|
||||
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
|
||||
BlendingMode = BlendingMode.Additive
|
||||
},
|
||||
@ -133,7 +136,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
Name = "Left overlay",
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Size = new Vector2(left_area_size, 1),
|
||||
BorderThickness = 1,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
overlayBackground = new Box
|
||||
@ -156,6 +158,24 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
},
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
Name = "Border",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
MaskingSmoothness = 0,
|
||||
BorderThickness = 2,
|
||||
AlwaysPresent = true,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
}
|
||||
}
|
||||
},
|
||||
topLevelHitContainer = new Container
|
||||
{
|
||||
Name = "Top level hit objects",
|
||||
|
Loading…
Reference in New Issue
Block a user