1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-30 13:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/TestCaseClickableText.cs

31 lines
1.3 KiB
C#
Raw Normal View History

2018-07-22 14:28:12 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using System;
using System.Collections.Generic;
namespace osu.Game.Tests.Visual
{
public class TestCaseClickableText : OsuTestCase
{
2018-07-22 15:31:51 +08:00
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ClickableText), typeof(FillFlowContainer) };
2018-07-22 14:28:12 +08:00
2018-07-22 21:16:42 +08:00
private readonly ClickableText text;
public TestCaseClickableText() => Child = new FillFlowContainer
2018-07-22 18:02:45 +08:00
{
Children = new[]
2018-07-22 18:02:45 +08:00
{
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, },
2018-07-22 21:16:42 +08:00
text = new ClickableText { Text = "Disables after click (Action)", Action = () => text.IsEnabled = false },
new ClickableText { Text = "Has tooltip", TooltipText = "Yep", },
2018-07-22 18:02:45 +08:00
}
};
2018-07-22 14:28:12 +08:00
}
}