1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 15:20:18 +08:00

safe way to pass bindable

This commit is contained in:
cdwcgt
2022-12-30 22:58:46 +09:00
Unverified
parent a4d28aff6d
commit a91da2284d
@@ -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]