mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Small cleanups
This commit is contained in:
@ -24,50 +24,55 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Add(new Box
|
||||
Children = new Drawable[]
|
||||
{
|
||||
ColourInfo = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke),
|
||||
RelativeSizeAxes = Framework.Graphics.Axes.Both
|
||||
});
|
||||
new Box
|
||||
{
|
||||
ColourInfo = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke),
|
||||
RelativeSizeAxes = Framework.Graphics.Axes.Both
|
||||
},
|
||||
pauseOverlay = new PauseOverlay
|
||||
{
|
||||
Depth = -1
|
||||
},
|
||||
new FlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Origin = Anchor.TopLeft,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Direction = FlowDirection.VerticalOnly,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Button
|
||||
{
|
||||
Text = @"Pause",
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Width = 100,
|
||||
Height = 50,
|
||||
Colour = Color4.Black,
|
||||
Action = (() => pauseOverlay.Show())
|
||||
},
|
||||
new Button
|
||||
{
|
||||
Text = @"Add Retry",
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Width = 100,
|
||||
Height = 50,
|
||||
Colour = Color4.Black,
|
||||
Action = (delegate {
|
||||
retryCount++;
|
||||
pauseOverlay.SetRetries(retryCount);
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Add(pauseOverlay = new PauseOverlay { Depth = -1 });
|
||||
pauseOverlay.OnResume += (() => Logger.Log(@"Resume"));
|
||||
pauseOverlay.OnRetry += (() => Logger.Log(@"Retry"));
|
||||
pauseOverlay.OnQuit += (() => Logger.Log(@"Quit"));
|
||||
|
||||
Add(new FlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Origin = Anchor.TopLeft,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Direction = FlowDirection.VerticalOnly,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Button
|
||||
{
|
||||
Text = @"Pause",
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Width = 100,
|
||||
Height = 50,
|
||||
Colour = Color4.Black,
|
||||
Action = (() => pauseOverlay.Show())
|
||||
},
|
||||
new Button
|
||||
{
|
||||
Text = @"Add Retry",
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Width = 100,
|
||||
Height = 50,
|
||||
Colour = Color4.Black,
|
||||
Action = (delegate {
|
||||
retryCount++;
|
||||
pauseOverlay.SetRetries(retryCount);
|
||||
}),
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user