Update with framework bindable changes

This commit is contained in:
smoogipoo
2019-02-21 18:56:34 +09:00
parent d637b184e4
commit bca347427f
195 changed files with 567 additions and 555 deletions

View File

@ -55,7 +55,7 @@ namespace osu.Game.Screens.Multi.Match
public MatchSubScreen(Room room)
{
Title = room.RoomID.Value == null ? "New room" : room.Name;
Title = room.RoomID.Value == null ? "New room" : room.Name.Value;
}
[BackgroundDependencyLoader]
@ -146,10 +146,10 @@ namespace osu.Game.Screens.Multi.Match
},
};
header.Tabs.Current.BindValueChanged(t =>
header.Tabs.Current.BindValueChanged(e =>
{
const float fade_duration = 500;
if (t is SettingsMatchPage)
if (e.NewValue is SettingsMatchPage)
{
settings.Show();
info.FadeOut(fade_duration, Easing.OutQuint);
@ -188,15 +188,15 @@ namespace osu.Game.Screens.Multi.Match
/// <summary>
/// Handles propagation of the current playlist item's content to game-wide mechanisms.
/// </summary>
private void currentItemChanged(PlaylistItem item)
private void currentItemChanged(ValueChangedEvent<PlaylistItem> e)
{
// Retrieve the corresponding local beatmap, since we can't directly use the playlist's beatmap info
var localBeatmap = item?.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == item.Beatmap.OnlineBeatmapID);
var localBeatmap = e.NewValue?.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == e.NewValue.Beatmap.OnlineBeatmapID);
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
CurrentMods.Value = item?.RequiredMods ?? Enumerable.Empty<Mod>();
if (item?.Ruleset != null)
Ruleset.Value = item.Ruleset;
CurrentMods.Value = e.NewValue?.RequiredMods ?? Enumerable.Empty<Mod>();
if (e.NewValue?.Ruleset != null)
Ruleset.Value = e.NewValue.Ruleset;
}
/// <summary>
@ -228,7 +228,7 @@ namespace osu.Game.Screens.Multi.Match
{
default:
case GameTypeTimeshift _:
multiplayer?.Start(() => new TimeshiftPlayer(CurrentItem)
multiplayer?.Start(() => new TimeshiftPlayer(CurrentItem.Value)
{
Exited = () => leaderboard.RefreshScores()
});