// A log item is clicked, highlight it
    public void OnLogItemClicked(DebugLogItem item)
    {
        if (indexOfSelectedLogEntry != item.Index)
        {
            DeselectSelectedLogItem();

            indexOfSelectedLogEntry       = item.Index;
            positionOfSelectedLogEntry    = item.Index * logItemHeight;
            heightOfSelectedLogEntry      = item.CalculateExpandedHeight(item.ToString());
            deltaHeightOfSelectedLogEntry = heightOfSelectedLogEntry - logItemHeight;

            manager.SetSnapToBottom(false);
        }
        else
        {
            DeselectSelectedLogItem();
        }

        if (indexOfSelectedLogEntry >= currentTopIndex && indexOfSelectedLogEntry <= currentBottomIndex)
        {
            ColorLogItem(logItemsAtIndices[indexOfSelectedLogEntry], indexOfSelectedLogEntry);
        }

        CalculateContentHeight();

        HardResetItems();
        UpdateItemsInTheList(true);

        manager.ValidateScrollPosition();
    }
Exemplo n.º 2
0
 public void OnScroll(PointerEventData data)
 {
     if (IsScrollbarAtBottom())
     {
         debugLogManager.SetSnapToBottom(true);
     }
     else
     {
         debugLogManager.SetSnapToBottom(false);
     }
 }