Example #1
0
 void StartAnimation(object sender, EventArgs args)
 {
     drag_rect_to_mouse = true;
     rect_color.SetTargetValue(new Color(0, 0, 0, 0), true);
     rect_color.TransitionSpeed = 4f;
     rect_color.SetTargetValue(Parent.VisualSettings.OutlineColor);
     //rect.SetTargetValue(Parent.DrawingArea, true);
     round_amount.SetTargetValue(1f);
 }
Example #2
0
 void EndAnimation(object sender, EventArgs args)
 {
     drag_rect_to_mouse = false;
     snap_rect_to_mouse = false;
     round_amount.SetTargetValue(0f);
     rect_color.TransitionSpeed = 1f;
     rect_color.SetTargetValue(new Color(0, 0, 0, 0));
     rect.SetTargetValue(rect.Current.WithScaledSize(_expand_rect_on_release).WithCenter(rect.Current));
 }
Example #3
0
        void Update(object sender, EventArgs args)
        {
            _follow =
                ActivationPolicy == primary_hovered && Parent.IsPrimaryHovered ||
                ActivationPolicy == hovered_over && Parent.IsHoveredOver ||
                ActivationPolicy == always_active;

            _draw_color.InterpolationSettings = _follow ? ShineSpeed : ShineOffSpeed;

            var color = _follow ? Color : Color.Transparent;

            _draw_color.SetTargetValue(color);

            _draw_color.Update(Parent.UpdateData.ElapsedSeconds);
        }