mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:25:05 +08:00
Group ValueChanged attachment with bindings
This commit is contained in:
parent
3f020a2802
commit
f0c72438a3
@ -51,26 +51,31 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
||||
};
|
||||
|
||||
header.OnWantsSelectBeatmap = () => Push(new MatchSongSelect());
|
||||
nameBind.ValueChanged += n => info.Name = n;
|
||||
statusBind.ValueChanged += s => info.Status = s;
|
||||
availabilityBind.ValueChanged += a => info.Availability = a;
|
||||
typeBind.ValueChanged += t => info.Type = t;
|
||||
maxParticipantsBind.ValueChanged += m => { participants.Max = m; };
|
||||
participantsBind.ValueChanged += p => participants.Users = p;
|
||||
|
||||
beatmapBind.ValueChanged += b =>
|
||||
beatmapBind.BindTo(room.Beatmap);
|
||||
beatmapBind.BindValueChanged(b =>
|
||||
{
|
||||
header.BeatmapSet = b?.BeatmapSet;
|
||||
info.Beatmap = b;
|
||||
};
|
||||
}, true);
|
||||
|
||||
nameBind.BindTo(room.Name);
|
||||
nameBind.BindValueChanged(n => info.Name = n, true);
|
||||
|
||||
statusBind.BindTo(room.Status);
|
||||
statusBind.BindValueChanged(s => info.Status = s, true);
|
||||
|
||||
availabilityBind.BindTo(room.Availability);
|
||||
availabilityBind.BindValueChanged(a => info.Availability = a, true);
|
||||
|
||||
typeBind.BindTo(room.Type);
|
||||
beatmapBind.BindTo(room.Beatmap);
|
||||
typeBind.BindValueChanged(t => info.Type = t, true);
|
||||
|
||||
maxParticipantsBind.BindTo(room.MaxParticipants);
|
||||
maxParticipantsBind.BindValueChanged(m => { participants.Max = m; }, true);
|
||||
|
||||
participantsBind.BindTo(room.Participants);
|
||||
participantsBind.BindValueChanged(p => participants.Users = p, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user