mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Rename ControlItem
-> ChannelListItem
and associated classes
This commit is contained in:
parent
653bb47dd5
commit
ba5a43b526
@ -12,13 +12,13 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Chat.ChannelControl;
|
||||
using osu.Game.Overlays.Chat.ChannelList;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestSceneChannelControlItem : OsuTestScene
|
||||
public class TestSceneChannelListItem : OsuTestScene
|
||||
{
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
|
||||
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
createPrivateChannel("test user long name", 3),
|
||||
};
|
||||
|
||||
private readonly Dictionary<Channel, ControlItem> channelMap = new Dictionary<Channel, ControlItem>();
|
||||
private readonly Dictionary<Channel, ChannelListItem> channelMap = new Dictionary<Channel, ChannelListItem>();
|
||||
|
||||
private FillFlowContainer flow;
|
||||
private OsuSpriteText selectedText;
|
||||
@ -102,7 +102,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
foreach (var channel in channels)
|
||||
{
|
||||
var item = new ControlItem(channel);
|
||||
var item = new ChannelListItem(channel);
|
||||
flow.Add(item);
|
||||
channelMap.Add(channel, item);
|
||||
item.OnRequestSelect += c => selected.Value = c;
|
@ -18,9 +18,9 @@ using osu.Game.Online.Chat;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
namespace osu.Game.Overlays.Chat.ChannelList
|
||||
{
|
||||
public class ControlItem : OsuClickableContainer
|
||||
public class ChannelListItem : OsuClickableContainer
|
||||
{
|
||||
public event Action<Channel>? OnRequestSelect;
|
||||
public event Action<Channel>? OnRequestLeave;
|
||||
@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
private Box? hoverBox;
|
||||
private Box? selectBox;
|
||||
private OsuSpriteText? text;
|
||||
private ControlItemClose? close;
|
||||
private ChannelListItemClose? close;
|
||||
|
||||
[Resolved]
|
||||
private Bindable<Channel> selectedChannel { get; set; } = null!;
|
||||
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
public ControlItem(Channel channel)
|
||||
public ChannelListItem(Channel channel)
|
||||
{
|
||||
this.channel = channel;
|
||||
}
|
||||
@ -97,14 +97,14 @@ namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Truncate = true,
|
||||
},
|
||||
new ControlItemMention
|
||||
new ChannelListItemMention
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Margin = new MarginPadding { Right = 3 },
|
||||
Mentions = { BindTarget = Mentions },
|
||||
},
|
||||
close = new ControlItemClose
|
||||
close = new ChannelListItemClose
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
@ -10,9 +10,9 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
namespace osu.Game.Overlays.Chat.ChannelList
|
||||
{
|
||||
public class ControlItemClose : OsuAnimatedButton
|
||||
public class ChannelListItemClose : OsuAnimatedButton
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour osuColour)
|
@ -12,9 +12,9 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.ChannelControl
|
||||
namespace osu.Game.Overlays.Chat.ChannelList
|
||||
{
|
||||
public class ControlItemMention : CircularContainer
|
||||
public class ChannelListItemMention : CircularContainer
|
||||
{
|
||||
public readonly BindableInt Mentions = new BindableInt();
|
||||
|
Loading…
Reference in New Issue
Block a user