mirror of
https://github.com/osukey/osukey.git
synced 2025-06-09 21:37:59 +09:00
Merge branch 'master' into dependency-updates
This commit is contained in:
commit
ce269eaebb
@ -27,6 +27,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
private readonly Random rng = new Random(1337);
|
private readonly Random rng = new Random(1337);
|
||||||
private TaikoPlayfield playfield;
|
private TaikoPlayfield playfield;
|
||||||
|
private Container playfieldContainer;
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
@ -48,14 +49,17 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
AddStep("Height test 3", () => changePlayfieldSize(3));
|
AddStep("Height test 3", () => changePlayfieldSize(3));
|
||||||
AddStep("Height test 4", () => changePlayfieldSize(4));
|
AddStep("Height test 4", () => changePlayfieldSize(4));
|
||||||
AddStep("Height test 5", () => changePlayfieldSize(5));
|
AddStep("Height test 5", () => changePlayfieldSize(5));
|
||||||
|
AddStep("Reset height", () => changePlayfieldSize(6));
|
||||||
|
|
||||||
var rateAdjustClock = new StopwatchClock(true) { Rate = 1 };
|
var rateAdjustClock = new StopwatchClock(true) { Rate = 1 };
|
||||||
|
|
||||||
Add(new Container
|
Add(playfieldContainer = new Container
|
||||||
{
|
{
|
||||||
Clock = new FramedClock(rateAdjustClock),
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Y = 200,
|
Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT,
|
||||||
|
Clock = new FramedClock(rateAdjustClock),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
playfield = new TaikoPlayfield()
|
playfield = new TaikoPlayfield()
|
||||||
@ -65,6 +69,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
private void changePlayfieldSize(int step)
|
private void changePlayfieldSize(int step)
|
||||||
{
|
{
|
||||||
|
// Add new hits
|
||||||
switch (step)
|
switch (step)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@ -81,11 +86,20 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
addSwell(1000);
|
addSwell(1000);
|
||||||
playfield.Delay(scroll_time - 100);
|
playfieldContainer.Delay(scroll_time - 100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playfield.ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
// Tween playfield height
|
||||||
|
switch (step)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
playfieldContainer.ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
playfieldContainer.ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT), 500);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addHitJudgement()
|
private void addHitJudgement()
|
||||||
|
@ -33,6 +33,11 @@ namespace osu.Game.Modes.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action OnAllJudged;
|
public event Action OnAllJudged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to apply adjustments to the child <see cref="Playfield{TObject,TJudgement}"/> based on our own size.
|
||||||
|
/// </summary>
|
||||||
|
public bool AspectAdjust = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The input manager for this HitRenderer.
|
/// The input manager for this HitRenderer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -168,11 +173,6 @@ namespace osu.Game.Modes.UI
|
|||||||
{
|
{
|
||||||
public event Action<TJudgement> OnJudgement;
|
public event Action<TJudgement> OnJudgement;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Whether to apply adjustments to the child <see cref="Playfield{TObject,TJudgement}"/> based on our own size.
|
|
||||||
/// </summary>
|
|
||||||
public bool AspectAdjust = true;
|
|
||||||
|
|
||||||
public sealed override bool ProvidingUserCursor => !HasReplayLoaded && Playfield.ProvidingUserCursor;
|
public sealed override bool ProvidingUserCursor => !HasReplayLoaded && Playfield.ProvidingUserCursor;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
@ -39,6 +39,9 @@ namespace osu.Game.Modes.UI
|
|||||||
{
|
{
|
||||||
AlwaysReceiveInput = true;
|
AlwaysReceiveInput = true;
|
||||||
|
|
||||||
|
// Default height since we force relative size axes
|
||||||
|
Size = Vector2.One;
|
||||||
|
|
||||||
AddInternal(ScaledContent = new ScaledContainer
|
AddInternal(ScaledContent = new ScaledContainer
|
||||||
{
|
{
|
||||||
CustomWidth = customWidth,
|
CustomWidth = customWidth,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user