mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
FIx code quality
This commit is contained in:
parent
7f4bfb25a9
commit
73a98b45e9
@ -4,15 +4,11 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Chat;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
@ -47,6 +43,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Id = 3,
|
||||
Username = "LocalUser"
|
||||
};
|
||||
|
||||
string uuid = Guid.NewGuid().ToString();
|
||||
AddStep("add local echo message", () => channel.AddLocalEcho(new LocalEchoMessage
|
||||
{
|
||||
@ -104,7 +101,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
int messageCount = 1;
|
||||
|
||||
AddRepeatStep($"add messages", () =>
|
||||
AddRepeatStep("add messages", () =>
|
||||
{
|
||||
channel.AddNewMessages(new Message(messageCount)
|
||||
{
|
||||
@ -116,7 +113,6 @@ namespace osu.Game.Tests.Visual.Online
|
||||
messageCount++;
|
||||
}, 10);
|
||||
|
||||
|
||||
AddUntilStep("10 message present", () => drawableChannel.ChildrenOfType<ChatLine>().Count() == 10);
|
||||
|
||||
int checkCount = 0;
|
||||
|
@ -81,12 +81,14 @@ namespace osu.Game.Overlays.Chat
|
||||
alteringBackground = value;
|
||||
|
||||
if (background == null)
|
||||
{
|
||||
AddInternal(background = new Box
|
||||
{
|
||||
BypassAutoSizeAxes = Axes.Both,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
});
|
||||
}
|
||||
|
||||
background.Alpha = value ? 0.04f : 0f;
|
||||
}
|
||||
|
@ -107,8 +107,12 @@ namespace osu.Game.Overlays.Chat
|
||||
private void processMessageBackgroundAltering()
|
||||
{
|
||||
for (int i = 0; i < ChatLineFlow.Count(); i++)
|
||||
{
|
||||
if (ChatLineFlow[i] is ChatLine chatline)
|
||||
{
|
||||
chatline.AlteringBackground = i % 2 == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user