mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
safe way to pass bindable
This commit is contained in:
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]
|
||||
|
Loading…
Reference in New Issue
Block a user