protected override void OnPaint(PaintEventArgs e)
{
if (uwfHovered || scrollDraging)
{
scrollDestinationColor = ScrollHoverColor;
}
else
{
scrollDestinationColor = ScrollColor;
}
MathHelper.ColorLerp(scrollDestinationColor, 4, ref scrollCurrentColorA, ref scrollCurrentColorR, ref scrollCurrentColorG, ref scrollCurrentColorB);
scrollCurrentColor = Color.FromArgb((int)scrollCurrentColorA, (int)scrollCurrentColorR, (int)scrollCurrentColorR, (int)scrollCurrentColorB);
if (scrollOrientation == ScrollOrientation.HorizontalScroll)
{
int backX = subtractButton.Location.X + subtractButton.Width;
e.Graphics.uwfFillRectangle(BackColor, backX, 0, addButton.Location.X - backX, Height);
}
else
{
int backY = subtractButton.Location.Y + subtractButton.Height;
e.Graphics.uwfFillRectangle(BackColor, 0, backY, Width, addButton.Location.Y - backY);
}
e.Graphics.uwfFillRectangle(scrollCurrentColor, scrollRect.X, scrollRect.Y, scrollRect.Width, scrollRect.Height);
}