internal override void OnSelectedInstructionChanged(int index)
        {
            listViewState.row = index;

            if (listViewState.row >= 0 && index < m_Instructions.Count)
            {
                if (m_CachedInstructionInfo == null)
                {
                    m_CachedInstructionInfo = new CachedInstructionInfo();
                }

                m_Instruction = m_Instructions[listViewState.row];

                //updated Cached data related to the Selected Instruction
                m_CachedInstructionInfo.styleContainer.inspectedStyle  = m_Instruction.usedGUIStyle;
                m_CachedInstructionInfo.styleContainerSerializedObject = null;
                m_CachedInstructionInfo.styleSerializedProperty        = null;
                GetSelectedStyleProperty(out m_CachedInstructionInfo.styleContainerSerializedObject, out m_CachedInstructionInfo.styleSerializedProperty);

                //Hightlight the item
                debuggerWindow.HighlightInstruction(debuggerWindow.inspected, m_Instruction.rect, m_Instruction.usedGUIStyle);
            }
            else
            {
                m_CachedInstructionInfo = null;

                debuggerWindow.ClearInstructionHighlighter();
            }
        }
Exemple #2
0
 internal override void OnSelectedInstructionChanged(int index)
 {
     base.listViewState.row = index;
     if (base.listViewState.row >= 0)
     {
         if (this.m_CachedInstructionInfo == null)
         {
             this.m_CachedInstructionInfo = new StyleDrawInspectView.CachedInstructionInfo();
         }
         this.m_Instruction = this.m_Instructions[base.listViewState.row];
         this.m_CachedInstructionInfo.styleContainer.inspectedStyle  = this.m_Instruction.usedGUIStyle;
         this.m_CachedInstructionInfo.styleContainerSerializedObject = null;
         this.m_CachedInstructionInfo.styleSerializedProperty        = null;
         this.GetSelectedStyleProperty(out this.m_CachedInstructionInfo.styleContainerSerializedObject, out this.m_CachedInstructionInfo.styleSerializedProperty);
         base.debuggerWindow.HighlightInstruction(base.debuggerWindow.inspected, this.m_Instruction.rect, this.m_Instruction.usedGUIStyle);
     }
     else
     {
         this.m_CachedInstructionInfo = null;
         base.debuggerWindow.ClearInstructionHighlighter();
     }
 }