Example #1
0
 void CheckNewMaxHeight(TextLineItem _item, float _oldValue)
 {
     if (
         a_MaxHeightChildItem == null ||
         (_item != a_MaxHeightChildItem && a_MaxHeightChildItem.Height < _item.Height) ||
         (_item == a_MaxHeightChildItem && a_MaxHeightChildItem.Height > _oldValue)
         )
     {
         NewMaxHeight(_item);
     }
     else if (_item == a_MaxHeightChildItem && a_MaxHeightChildItem.Height < _oldValue)
     {
         FindMaxHeight();
     }
 }
Example #2
0
        // a_MaxHeightChildItem, newMaxHeight
        void FindMaxHeight()
        {
            if (a_LineItems.Count == 0)
            {
                NewMaxHeightZerro();
            }

            TextLineItem maxHeightItem = null;

            foreach (TextLineItem item in a_LineItems)
            {
                if (maxHeightItem == null || item.Height > maxHeightItem.Height)
                {
                    maxHeightItem = item;
                }
            }

            NewMaxHeight(maxHeightItem);
        }
Example #3
0
 void NewMaxHeightZerro()
 {
     Height = 0;
     a_MaxHeightChildItem = null;
 }
Example #4
0
 void NewMaxHeight(TextLineItem _item)
 {
     Height = _item.Height;
     a_MaxHeightChildItem = _item;
 }