mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Update with framework bindable changes
This commit is contained in:
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
CurrentItem.BindValueChanged(v => updateText(), true);
|
||||
CurrentItem.BindValueChanged(e => updateText(), true);
|
||||
}
|
||||
|
||||
private float textSize = OsuSpriteText.FONT_SIZE;
|
||||
|
@ -51,11 +51,11 @@ namespace osu.Game.Screens.Multi.Components
|
||||
}
|
||||
};
|
||||
|
||||
CurrentItem.BindValueChanged(item =>
|
||||
CurrentItem.BindValueChanged(e =>
|
||||
{
|
||||
beatmapAuthor.Clear();
|
||||
|
||||
var beatmap = item?.Beatmap;
|
||||
var beatmap = e.NewValue?.Beatmap;
|
||||
|
||||
if (beatmap != null)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
if (!Enabled)
|
||||
if (!Enabled.Value)
|
||||
return true;
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
@ -46,9 +46,9 @@ namespace osu.Game.Screens.Multi.Components
|
||||
},
|
||||
};
|
||||
|
||||
CurrentItem.BindValueChanged(updateBeatmap, true);
|
||||
CurrentItem.BindValueChanged(e => updateBeatmap(e.NewValue), true);
|
||||
|
||||
Type.BindValueChanged(v => gameTypeContainer.Child = new DrawableGameType(v) { Size = new Vector2(height) }, true);
|
||||
Type.BindValueChanged(e => gameTypeContainer.Child = new DrawableGameType(e.NewValue) { Size = new Vector2(height) }, true);
|
||||
}
|
||||
|
||||
private void updateBeatmap(PlaylistItem item)
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
|
||||
InternalChild = sprite = CreateBackgroundSprite();
|
||||
|
||||
CurrentItem.BindValueChanged(i => sprite.Beatmap.Value = i?.Beatmap, true);
|
||||
CurrentItem.BindValueChanged(e => sprite.Beatmap.Value = e.NewValue?.Beatmap, true);
|
||||
}
|
||||
|
||||
protected virtual UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both };
|
||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
};
|
||||
|
||||
MaxParticipants.BindValueChanged(_ => updateMax(), true);
|
||||
ParticipantCount.BindValueChanged(v => count.Text = v.ToString("#,0"), true);
|
||||
ParticipantCount.BindValueChanged(e => count.Text = e.NewValue.ToString("#,0"), true);
|
||||
}
|
||||
|
||||
private void updateMax()
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
public EndDatePart()
|
||||
: base(DateTimeOffset.UtcNow)
|
||||
{
|
||||
EndDate.BindValueChanged(d => Date = d);
|
||||
EndDate.BindValueChanged(e => Date = e.NewValue);
|
||||
}
|
||||
|
||||
protected override string Format()
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
status.BindValueChanged(s => this.FadeColour(s.GetAppropriateColour(colours), transitionDuration), true);
|
||||
status.BindValueChanged(e => this.FadeColour(e.NewValue.GetAppropriateColour(colours), transitionDuration), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user