well i guess writing custom drag-able panel script might have taken a lot of time and i didn't pay NGUI to write custom code so i modified UIDraggablePanel to match my requirement
Just change the RestrictWithinBounds to this add some global declarations at the top
/// <summary>
/// Bool to determine whether to inform other object when the user has reached top limit or bottom limit of a dragable panel
/// </summary>
[SerializeField] private bool postLimitEvent;
/// <summary>
/// Reciever game object to send Limit notification.
/// </summary>
[SerializeField] private GameObject recieverGameObject;
/// <summary>
/// Method to be called when top limit reached
/// </summary>
[SerializeField] private string topLimitMethodName;
/// <summary>
/// Method to be called when bottom limit reached
/// </summary>
[SerializeField] private string bottomLimitMethodName;
public bool RestrictWithinBounds (bool instant)
{
Vector3 constraint = mPanel.CalculateConstrainOffset(bounds.min, bounds.max);
if(postLimitEvent)
{
if(constraint.y > 0)
recieverGameObject.SendMessage(topLimitMethodName,SendMessageOptions.RequireReceiver);
if(constraint.y < 0)
recieverGameObject.SendMessage(bottomLimitMethodName,SendMessageOptions.RequireReceiver);
}
if (constraint.magnitude > 0.001f)
{
if (!instant && dragEffect == DragEffect.MomentumAndSpring)
{
// Spring back into place
SpringPanel.Begin(mPanel.gameObject, mTrans.localPosition + constraint, 13f);
}
else
{
// Jump back into place
MoveRelative(constraint);
mMomentum = Vector3.zero;
mScroll = 0f;
}
return true;
}
return false;
}
Hope other might find it help full.