1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

Update framework with better children list

This commit is contained in:
Thomas Müller 2017-06-24 12:56:35 +02:00
parent f70bdd80aa
commit 1bca9ca0e9
9 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Chat
public IEnumerable<Channel> Channels
{
set { ChannelFlow.Children = value.Select(c => new ChannelListItem(c)); }
set { ChannelFlow.ChildrenEnumerable = value.Select(c => new ChannelListItem(c)); }
}
public ChannelSection()

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Chat
{
set
{
sectionsFlow.Children = value;
sectionsFlow.ChildrenEnumerable = value;
foreach (ChannelSection s in sectionsFlow.Children)
{

View File

@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Dialog
get { return buttonsContainer.Children; }
set
{
buttonsContainer.Children = value;
buttonsContainer.ChildrenEnumerable = value;
foreach (PopupDialogButton b in value)
{
var action = b.Action;

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Direct
SetInfo = setInfo;
}
protected IEnumerable<DifficultyIcon> GetDifficultyIcons()
protected List<DifficultyIcon> GetDifficultyIcons()
{
var icons = new List<DifficultyIcon>();

View File

@ -129,7 +129,7 @@ namespace osu.Game.Overlays
private void recreatePanels(PanelDisplayStyle displayStyle)
{
if (BeatmapSets == null) return;
panels.Children = BeatmapSets.Select(b => displayStyle == PanelDisplayStyle.Grid ? (DirectPanel)new DirectGridPanel(b) { Width = 400 } : new DirectListPanel(b));
panels.ChildrenEnumerable = BeatmapSets.Select(b => displayStyle == PanelDisplayStyle.Grid ? (DirectPanel)new DirectGridPanel(b) { Width = 400 } : new DirectListPanel(b));
}
public class ResultCounts

View File

@ -44,7 +44,7 @@ namespace osu.Game.Overlays
panelFlow.Clear();
else
{
panelFlow.Children = users.Select(u =>
panelFlow.ChildrenEnumerable = users.Select(u =>
{
var p = new UserPanel(u) { Width = 300 };
p.Status.BindTo(u.Status);

View File

@ -495,7 +495,7 @@ namespace osu.Game.Screens.Multiplayer
levelRangeLower.Text = ranks.Min().ToString();
levelRangeHigher.Text = ranks.Max().ToString();
participantsFlow.Children = value.Select(u => new UserTile(u));
participantsFlow.ChildrenEnumerable = value.Select(u => new UserTile(u));
}
private class UserTile : Container, IHasTooltip

View File

@ -164,7 +164,7 @@ namespace osu.Game.Screens.Ranking
}
};
statisticsContainer.Children = Score.Statistics.Select(s => new DrawableScoreStatistic(s));
statisticsContainer.ChildrenEnumerable = Score.Statistics.Select(s => new DrawableScoreStatistic(s));
}
protected override void LoadComplete()

View File

@ -439,7 +439,7 @@ namespace osu.Game.Screens.Select
{
Show();
if (header.Text == "Tags")
content.Children = value.Split(' ').Select(text => new OsuSpriteText
content.ChildrenEnumerable = value.Split(' ').Select(text => new OsuSpriteText
{
Text = text,
Font = "Exo2.0-Regular",