Borodar.ReorderableList.ReorderableListControl.PrepareState C# (CSharp) Method

PrepareState() private method

Prepare initial state for list control.
private PrepareState ( int controlID, IReorderableListAdaptor adaptor ) : void
controlID int Unique ID of list control.
adaptor IReorderableListAdaptor Reorderable list adaptor.
return void
        private void PrepareState(int controlID, IReorderableListAdaptor adaptor)
        {
            _controlID = controlID;
            _visibleRect = GUIHelper.VisibleRect();

            if ((Flags & ReorderableListFlags.ShowIndices) != 0)
                _indexLabelWidth = CountDigits(adaptor.Count) * 8 + 8;
            else
                _indexLabelWidth = 0;

            _tracking = IsTrackingControl(controlID);

            _allowReordering = (Flags & ReorderableListFlags.DisableReordering) == 0;

            // The value of this field is reset each time the control is drawn and may
            // be invalidated when list items are drawn.
            _allowDropInsertion = true;
        }