1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:55:37 +08:00

Use using

This commit is contained in:
HoutarouOreki 2018-07-22 12:02:45 +02:00
parent 50b6f88a4e
commit 7e327fd084

View File

@ -12,11 +12,11 @@ namespace osu.Game.Tests.Visual
{
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ClickableText), typeof(FillFlowContainer) };
public TestCaseClickableText()
{
ClickableText text;
ClickableText text;
Add(new FillFlowContainer<ClickableText>
protected override void LoadComplete()
{
using (var fillFlowContainer = new FillFlowContainer<ClickableText>
{
Direction = FillDirection.Vertical,
Children = new[]
@ -29,8 +29,12 @@ namespace osu.Game.Tests.Visual
text = new ClickableText{ Text = "Disables after click (Action)", },
new ClickableText{ Text = "Has tooltip", TooltipText = "Yep", }
}
});
})
{
Add(fillFlowContainer);
}
text.Action = () => text.IsEnabled = false;
base.LoadComplete();
}
}
}