Пример #1
0
 public void jumpToFirstBar()
 {
     if (currentBar.Value == firstBar())
     {
         currentBar.TriggerChange();
     }
     else
     {
         currentBar.Value = firstBar();
     }
 }
Пример #2
0
        void load(DrawableEditor editor)
        {
            _editor = editor;

            _fontSize = editor.FontSize.GetBoundCopy() as BindableFloat;
            _fontSize.BindValueChanged(s => Scheduler.AddOnce(() =>
            {
                Size = new Vector2(3, s);
                ResetFlicker();
            }));

            _lineNumberWidth = editor.LineNumberWidth.GetBoundCopy() as BindableInt;
            _lineNumberWidth.BindValueChanged(w => Scheduler.AddOnce(ResetFlicker));

            _selectionEnd = _selection.End.GetBoundCopy() as BindableInt;
            _selectionEnd.BindValueChanged(i => Scheduler.AddOnce(ResetFlicker));

            // This updates the caret
            _fontSize.TriggerChange();
        }