Exemplo n.º 1
0
        private void OnMessageRemoved(RuntimeConsole console, ConsoleLogEntry[] arg)
        {
            bool scroll = false;

            if (m_scrollRect.Index + m_scrollRect.VisibleItemsCount == m_scrollRect.ItemsCount)
            {
                scroll = true;
            }
            DataBind();
            if (scroll)
            {
                m_scrollRect.verticalNormalizedPosition = 0;
            }
        }
Exemplo n.º 2
0
        private void OnMessageAdded(RuntimeConsole console, ConsoleLogEntry logEntry)
        {
            bool scroll = false;

            if (m_scrollRect.Index + m_scrollRect.VisibleItemsCount == m_scrollRect.ItemsCount)
            {
                scroll = true;
            }

            if (CanAdd(logEntry.LogType))
            {
                m_treeView.Add(logEntry);
            }
            UpdateCounters();

            if (scroll)
            {
                m_scrollRect.verticalNormalizedPosition = 0;
            }
        }