mirror of
https://github.com/osukey/osukey.git
synced 2025-05-21 05:27:17 +09:00
Add TestCaseMatchParticipants.
This commit is contained in:
parent
8595c821b4
commit
7edb82eb85
@ -22,7 +22,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddStep(@"set name", () => info.Name = @"Room Name?");
|
AddStep(@"set name", () => info.Name = @"Room Name?");
|
||||||
AddStep(@"set availability", () => info.Availability = RoomAvailability.FriendsOnly);
|
AddStep(@"set availability", () => info.Availability = RoomAvailability.FriendsOnly);
|
||||||
AddStep(@"set status", () => info.Status = new RoomStatusPlaying());
|
AddStep(@"set status", () => info.Status = new RoomStatusPlaying());
|
||||||
|
|
||||||
AddStep(@"set beatmap", () => info.Beatmap = new BeatmapInfo
|
AddStep(@"set beatmap", () => info.Beatmap = new BeatmapInfo
|
||||||
{
|
{
|
||||||
StarDifficulty = 2.4,
|
StarDifficulty = 2.4,
|
||||||
@ -40,7 +39,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddStep(@"change name", () => info.Name = @"Room Name!");
|
AddStep(@"change name", () => info.Name = @"Room Name!");
|
||||||
AddStep(@"change availability", () => info.Availability = RoomAvailability.InviteOnly);
|
AddStep(@"change availability", () => info.Availability = RoomAvailability.InviteOnly);
|
||||||
AddStep(@"change status", () => info.Status = new RoomStatusOpen());
|
AddStep(@"change status", () => info.Status = new RoomStatusOpen());
|
||||||
|
|
||||||
AddStep(@"change beatmap", () => info.Beatmap = new BeatmapInfo
|
AddStep(@"change beatmap", () => info.Beatmap = new BeatmapInfo
|
||||||
{
|
{
|
||||||
StarDifficulty = 4.2,
|
StarDifficulty = 4.2,
|
||||||
|
56
osu.Game.Tests/Visual/TestCaseMatchParticipants.cs
Normal file
56
osu.Game.Tests/Visual/TestCaseMatchParticipants.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Screens.Multi.Screens.Match;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class TestCaseMatchParticipants : OsuTestCase
|
||||||
|
{
|
||||||
|
public TestCaseMatchParticipants()
|
||||||
|
{
|
||||||
|
Participants participants;
|
||||||
|
Add(participants = new Participants
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep(@"set max to null", () => participants.Max = null);
|
||||||
|
AddStep(@"set users", () => participants.Users = new[]
|
||||||
|
{
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
Username = @"Feppla",
|
||||||
|
Id = 4271601,
|
||||||
|
Country = new Country { FlagName = @"SE" },
|
||||||
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
|
||||||
|
IsSupporter = true,
|
||||||
|
},
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
Username = @"Xilver",
|
||||||
|
Id = 3099689,
|
||||||
|
Country = new Country { FlagName = @"IL" },
|
||||||
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
|
||||||
|
IsSupporter = true,
|
||||||
|
},
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
Username = @"Wucki",
|
||||||
|
Id = 5287410,
|
||||||
|
Country = new Country { FlagName = @"FI" },
|
||||||
|
CoverUrl = @"https://assets.ppy.sh/user-profile-covers/5287410/5cfeaa9dd41cbce038ecdc9d781396ed4b0108089170bf7f50492ef8eadeb368.jpeg",
|
||||||
|
IsSupporter = true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep(@"set max", () => participants.Max = 10);
|
||||||
|
AddStep(@"clear users", () => participants.Users = new User[] { });
|
||||||
|
AddStep(@"set max to null", () => participants.Max = null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Width = 300,
|
Width = 300,
|
||||||
|
OnLoadComplete = d => d.FadeInFromZero(60),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
count.Count = value.Count();
|
count.Count = value.Count();
|
||||||
@ -61,6 +62,8 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
Padding = new MarginPadding { Top = 40 },
|
Padding = new MarginPadding { Top = 40 },
|
||||||
|
LayoutDuration = 200,
|
||||||
|
LayoutEasing = Easing.OutQuint,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user