public void RemoveEffectFromSelection() { if (Animator != null && Field != null && SelectionLength != 0) { AdjustedSelection selection = GetAdjustedStartAndEnd(); if (selection.Length > 0) { Animator.RemoveSectionsBetween((uint)selection.Start, (uint)selection.End); ClearSelection(); } } }
public void AddEffectToSelection(ITextAnimation effect) { if (Animator != null && Field != null && SelectionLength != 0) { AdjustedSelection selection = GetAdjustedStartAndEnd(); if (selection.Length > 0) { Animator.AddSection(new TextSection( (uint)selection.Start, (uint)selection.Length, effect, true )); ClearSelection(); } } }