mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Make room participants into a bindable list
This commit is contained in:
@ -51,9 +51,9 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
},
|
||||
};
|
||||
|
||||
Participants.BindValueChanged(participants =>
|
||||
Participants.ItemsAdded += users =>
|
||||
{
|
||||
usersFlow.Children = participants.NewValue.Select(u =>
|
||||
usersFlow.AddRange(users.Select(u =>
|
||||
{
|
||||
var panel = new UserPanel(u)
|
||||
{
|
||||
@ -65,8 +65,13 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
panel.OnLoadComplete += d => d.FadeInFromZero(60);
|
||||
|
||||
return panel;
|
||||
}).ToList();
|
||||
}, true);
|
||||
}).ToList());
|
||||
};
|
||||
|
||||
Participants.ItemsRemoved += users =>
|
||||
{
|
||||
usersFlow.RemoveAll(p => users.Contains(p.User));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user