Place HTML messages in a TextFlowContainer

Add missing accessibility modifier in ClickableText test case and fix disposal
This commit is contained in:
HoutarouOreki
2018-07-22 14:44:11 +02:00
parent 59cbc58edd
commit 2b7f657f2c
2 changed files with 19 additions and 27 deletions

View File

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