private float OnMouseDown()
{
if (!this.position.Contains(this.CurrentEvent().mousePosition) || this.IsEmptySlider())
{
return this.currentValue;
}
GUI.scrollTroughSide = 0;
GUIUtility.hotControl = this.id;
this.CurrentEvent().Use();
if (this.ThumbSelectionRect().Contains(this.CurrentEvent().mousePosition))
{
this.StartDraggingWithValue(this.ClampedCurrentValue());
return this.currentValue;
}
GUI.changed = true;
if (this.SupportsPageMovements())
{
this.SliderState().isDragging = false;
GUI.nextScrollStepTime = SystemClock.now.AddMilliseconds(250.0);
GUI.scrollTroughSide = this.CurrentScrollTroughSide();
return this.PageMovementValue();
}
float dragStartValue = this.ValueForCurrentMousePosition();
this.StartDraggingWithValue(dragStartValue);
return this.Clamp(dragStartValue);
}