/// <inheritdoc />
        public EventTrack(ref TrackCreateOptions options)
            : base(ref options, true, false)
        {
            Height = 20.0f;

            // Events editor
            Events = new KeyframesEditor
            {
                EnableZoom    = false,
                EnablePanning = false,
                ScrollBars    = ScrollBars.None,
            };
            Events.Edited += OnEventsEdited;
            Events.UnlockChildrenRecursive();

            _addKey.Clicked   += OnAddKeyClicked;
            _leftKey.Clicked  += OnLeftKeyClicked;
            _rightKey.Clicked += OnRightKeyClicked;
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConductorTrack"/> class.
 /// </summary>
 /// <param name="options">The track initial options.</param>
 /// <param name="useProxyKeyframes">True if show sub-tracks keyframes as a proxy on this track, otherwise false.</param>
 protected ConductorTrack(ref TrackCreateOptions options, bool useProxyKeyframes = true)
     : base(ref options)
 {
     if (useProxyKeyframes)
     {
         // Proxy keyframes editor
         Proxy = new KeyframesEditor
         {
             EnableZoom               = false,
             EnablePanning            = false,
             EnableKeyframesValueEdit = false,
             DefaultValue             = new ProxyKey(),
             ScrollBars               = ScrollBars.None,
         };
         Proxy.Edited     += OnProxyEdited;
         Proxy.EditingEnd += OnProxyEditingEnd;
         Proxy.UnlockChildrenRecursive();
     }
 }
        /// <inheritdoc />
        public KeyframesPropertyTrack(ref TrackCreateOptions options)
            : base(ref options)
        {
            Height = 20.0f;

            // Keyframes editor
            Keyframes = new KeyframesEditor
            {
                EnableZoom    = false,
                EnablePanning = false,
                ScrollBars    = ScrollBars.None,
            };
            Keyframes.Edited += OnKeyframesEdited;
            Keyframes.UnlockChildrenRecursive();

            _addKey.Clicked   += OnAddKeyClicked;
            _leftKey.Clicked  += OnLeftKeyClicked;
            _rightKey.Clicked += OnRightKeyClicked;
        }