safe way to pass bindable

This commit is contained in:
cdwcgt 2022-12-30 22:58:46 +09:00
parent a4d28aff6d
commit a91da2284d
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -22,10 +22,13 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
private partial class PreviewTimeVisualisation : PointVisualisation
{
private BindableInt previewTime = new BindableInt();
public PreviewTimeVisualisation(BindableInt time)
: base(time.Value)
{
time.BindValueChanged(s => X = s.NewValue);
previewTime.BindTo(time);
previewTime.BindValueChanged(s => X = s.NewValue);
}
[BackgroundDependencyLoader]