/// <inheritdoc /> public CurvePropertyTrackBase(ref TrackCreateOptions options) : base(ref options) { Height = CollapsedHeight; _addKey.Clicked += OnAddKeyClicked; _leftKey.Clicked += OnLeftKeyClicked; _rightKey.Clicked += OnRightKeyClicked; }
/// <inheritdoc /> public ObjectPropertyTrack(ref TrackCreateOptions options) : base(ref options, false, false) { // Add track button const float buttonSize = 14; _addButton = new Button(_muteCheckbox.Left - buttonSize - 2.0f, 0, buttonSize, buttonSize) { Text = "+", TooltipText = "Add sub-tracks", AutoFocus = true, AnchorStyle = AnchorStyle.CenterRight, IsScrollable = false, Parent = this }; _addButton.Clicked += OnAddButtonClicked; }
/// <inheritdoc /> public AnimationEventTrack(ref TrackCreateOptions options) : base(ref options) { // Add button const float buttonSize = 14; var addButton = new Button { Text = "+", TooltipText = "Add events", AutoFocus = true, AnchorPreset = AnchorPresets.MiddleRight, IsScrollable = false, Offsets = new Margin(-buttonSize - 2 + _muteCheckbox.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize), Parent = this, }; addButton.ButtonClicked += OnAddButtonClicked; }
/// <summary> /// Initializes a new instance of the <see cref="FolderTrack"/> class. /// </summary> /// <param name="options">The options.</param> public FolderTrack(ref TrackCreateOptions options) : base(ref options) { const float buttonSize = 14; var colorPickerButton = new Image(_muteCheckbox.Left - buttonSize - 2.0f, 0, buttonSize, buttonSize) { TooltipText = "Change folder color", AutoFocus = true, AnchorStyle = AnchorStyle.CenterRight, IsScrollable = false, Color = new Color(0.7f), Margin = new Margin(1), Brush = new SpriteBrush(Style.Current.Settings), Parent = this }; colorPickerButton.Clicked += OnColorPickerButtonClicked; }
/// <inheritdoc /> protected ObjectTrack(ref TrackCreateOptions options) : base(ref options) { // Add track button const float buttonSize = 14; _addButton = new Button { Text = "+", TooltipText = "Add sub-tracks", AutoFocus = true, AnchorPreset = AnchorPresets.MiddleRight, IsScrollable = false, Offsets = new Margin(-buttonSize - 2 + _muteCheckbox.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize), Parent = this, }; _addButton.Clicked += OnAddButtonClicked; }
/// <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; }
/// <summary> /// Initializes a new instance of the <see cref="FolderTrack"/> class. /// </summary> /// <param name="options">The options.</param> public FolderTrack(ref TrackCreateOptions options) : base(ref options) { const float buttonSize = 14; var colorPickerButton = new Image { TooltipText = "Change folder color", AutoFocus = true, AnchorPreset = AnchorPresets.MiddleRight, IsScrollable = false, Color = Style.Current.ForegroundGrey, Margin = new Margin(1), Brush = new SpriteBrush(Style.Current.Settings), Offsets = new Margin(-buttonSize - 2 + _muteCheckbox.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize), Parent = this, }; colorPickerButton.Clicked += OnColorPickerButtonClicked; }
/// <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; }
/// <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(); } }
/// <summary> /// Initializes a new instance of the <see cref="ActorTrack"/> 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> public ActorTrack(ref TrackCreateOptions options, bool useProxyKeyframes = true) : base(ref options, useProxyKeyframes) { // Select Actor button const float buttonSize = 18; var icons = Editor.Instance.Icons; _selectActor = new Image { TooltipText = "Selects the actor animated by this track", AutoFocus = true, AnchorPreset = AnchorPresets.MiddleRight, IsScrollable = false, Color = Style.Current.ForegroundGrey, Margin = new Margin(1), Brush = new SpriteBrush(icons.Search32), Offsets = new Margin(-buttonSize - 2 + _addButton.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize), Parent = this, }; _selectActor.Clicked += OnClickedSelectActor; }
public AddRemoveTrackAction(Timeline timeline, Track track, bool isAdd) { _timeline = timeline; _isAdd = isAdd; _options = new TrackCreateOptions { Archetype = track.Archetype, Flags = track.Flags, }; _color = track.Color; _name = track.Name; _parentName = track.ParentTrack?.Name; _order = track.TrackIndex; _expanded = track.IsExpanded; using (var memory = new MemoryStream(512)) using (var stream = new BinaryWriter(memory)) { _options.Archetype.Save(track, stream); _data = memory.ToArray(); } }
/// <inheritdoc /> public CameraCutTrack(ref TrackCreateOptions options) : base(ref options) { Height = CameraCutThumbnailRenderer.Height + 4 + 4; // Pilot Camera button const float buttonSize = 14; var icons = Editor.Instance.Icons; _pilotCamera = new Image(_selectActor.Left - buttonSize - 2.0f, 0, buttonSize, buttonSize) { TooltipText = "Starts piloting camera (in scene edit window)", AutoFocus = true, AnchorStyle = AnchorStyle.CenterRight, IsScrollable = false, Color = new Color(0.8f), Margin = new Margin(1), Brush = new SpriteBrush(icons.Camera32), Parent = this }; _pilotCamera.Clicked += OnClickedPilotCamera; }
/// <inheritdoc /> public CameraCutTrack(ref TrackCreateOptions options) : base(ref options) { Height = CameraCutThumbnailRenderer.Height + 4 + 4; // Pilot Camera button const float buttonSize = 14; var icons = Editor.Instance.Icons; _pilotCamera = new Image { TooltipText = "Starts piloting camera (in scene edit window)", AutoFocus = true, AnchorPreset = AnchorPresets.MiddleRight, IsScrollable = false, Color = Style.Current.ForegroundGrey, Margin = new Margin(1), Brush = new SpriteBrush(icons.Camera32), Offsets = new Margin(-buttonSize - 2 + _selectActor.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize), Parent = this, }; _pilotCamera.Clicked += OnClickedPilotCamera; }
/// <inheritdoc /> public ObjectReferencePropertyTrack(ref TrackCreateOptions options) : base(ref options) { }
/// <inheritdoc /> public CurvePropertyTrack(ref TrackCreateOptions options) : base(ref options) { }
/// <inheritdoc /> public StringPropertyTrack(ref TrackCreateOptions options) : base(ref options) { }
/// <summary> /// Initializes a new instance of the <see cref="AnimationChannelTrack"/> class. /// </summary> /// <param name="options">The options.</param> public AnimationChannelTrack(ref TrackCreateOptions options) : base(ref options) { _muteCheckbox.Visible = false; }
/// <inheritdoc /> protected SingleMediaTrack(ref TrackCreateOptions options) : base(ref options) { }
/// <summary> /// Initializes a new instance of the <see cref="ScreenFadeTrack"/> class. /// </summary> /// <param name="options">The options.</param> public ScreenFadeTrack(ref TrackCreateOptions options) : base(ref options) { }