mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Compress Test Case; Remove empty summary
This commit is contained in:
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System;
|
using System;
|
||||||
@ -12,57 +10,20 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
public class TestCaseClickableText : OsuTestCase
|
public class TestCaseClickableText : OsuTestCase
|
||||||
{
|
{
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[] {
|
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ClickableText) };
|
||||||
typeof(ClickableText),
|
|
||||||
typeof(FillFlowContainer<ClickableText>)
|
|
||||||
};
|
|
||||||
|
|
||||||
public TestCaseClickableText()
|
public TestCaseClickableText()
|
||||||
{
|
{
|
||||||
ClickableText text;
|
ClickableText text;
|
||||||
|
|
||||||
Add(new FillFlowContainer<ClickableText>
|
AddRange(new[] {
|
||||||
{
|
new ClickableText{ Text = "Default", },
|
||||||
Spacing = new Vector2(10),
|
new ClickableText{ IsEnabled = false, Text = "Disabled", },
|
||||||
RelativeSizeAxes = Axes.Both,
|
new ClickableText{ Text = "Without sounds", IsMuted = true, },
|
||||||
Anchor = Anchor.Centre,
|
new ClickableText{ Text = "Without click sounds", IsClickMuted = true, },
|
||||||
Origin = Anchor.Centre,
|
new ClickableText{ Text = "Without hover sounds", IsHoverMuted = true, },
|
||||||
Children = new[]
|
text = new ClickableText{ Text = "Disables after click (Action)", },
|
||||||
{
|
new ClickableText{ Text = "Has tooltip", TooltipText = "Yep", }
|
||||||
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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
text.Action = () => text.IsEnabled = false;
|
text.Action = () => text.IsEnabled = false;
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{/// <summary>
|
{
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public class ClickableText : OsuSpriteText, IHasTooltip
|
public class ClickableText : OsuSpriteText, IHasTooltip
|
||||||
{
|
{
|
||||||
private bool isEnabled;
|
private bool isEnabled;
|
||||||
|
Reference in New Issue
Block a user