mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add support for setting fixed size of status pill
This commit is contained in:
@ -2,11 +2,16 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Tests.Visual.UserInterface;
|
||||
using osuTK;
|
||||
|
||||
@ -28,5 +33,16 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
Status = status
|
||||
})
|
||||
};
|
||||
|
||||
private IEnumerable<BeatmapSetOnlineStatusPill> statusPills => this.ChildrenOfType<BeatmapSetOnlineStatusPill>();
|
||||
|
||||
[Test]
|
||||
public void TestFixedWidth()
|
||||
{
|
||||
AddStep("create themed content", () => CreateThemedContent(OverlayColourScheme.Red));
|
||||
|
||||
AddStep("set fixed width", () => statusPills.ForEach(pill => pill.FixedWidth = 90));
|
||||
AddStep("unset fixed width", () => statusPills.ForEach(pill => pill.FixedWidth = null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user