// Use this for first initialization
    void Awake()
    {
        // init friend list
        friendList = new List<FriendInfo>();
        for( int i=0; i<1000; i++ )
        {
            FriendInfo friendInfo = new FriendInfo( i, i.ToString(), "dummy_name_" + i.ToString() );
            friendList.Add( friendInfo );
        }

        friendList.Sort( SortByRank );

        // draggable panel init
        dragPanel = GetComponentInChildren<UIDraggablePanelEx>() as UIDraggablePanelEx;
        grid = GetComponentInChildren<UIGridEx>() as UIGridEx;

        FillGrid ();
    }
 /// <summary>
 /// Cache the transform and the panel.
 /// </summary>
 void Awake()
 {
     mTrans = transform;
     mPanel = GetComponent<UIPanel>();
     // addition to ngui for uniform draggable scroll panel
     mGrid = GetComponentInChildren<UIGridEx>();
     // fin
 }