public override void ShowOverlay() { if (!isInstructionSelected) { debuggerWindow.ClearInstructionHighlighter(); return; } IMGUILayoutInstruction instruction = m_LayoutInstructions[listViewState.row]; RectOffset offset = new RectOffset(); offset.left = instruction.marginLeft; offset.right = instruction.marginRight; offset.top = instruction.marginTop; offset.bottom = instruction.marginBottom; //TODO: right now the overlay only know about padding //For now we just save margin into padding //while the overlay isn't improved. m_FakeMarginStyleForOverlay.padding = offset; Rect rect = instruction.unclippedRect; rect = offset.Add(rect); debuggerWindow.HighlightInstruction(debuggerWindow.inspected, rect, m_FakeMarginStyleForOverlay); }
protected override void DrawInspectedStacktrace(float availableWidth) { IMGUILayoutInstruction instruction = m_LayoutInstructions[listViewState.row]; m_StacktraceScrollPos = EditorGUILayout.BeginScrollView(m_StacktraceScrollPos, GUIViewDebuggerWindow.Styles.stacktraceBackground, GUILayout.ExpandHeight(false)); DrawStackFrameList(instruction.stack, availableWidth); EditorGUILayout.EndScrollView(); }
protected override void DrawInspectedStacktrace() { IMGUILayoutInstruction instruction = this.m_LayoutInstructions[base.m_ListViewState.row]; GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandHeight(false) }; this.m_StacktraceScrollPos = EditorGUILayout.BeginScrollView(this.m_StacktraceScrollPos, GUIViewDebuggerWindow.s_Styles.stacktraceBackground, options); base.DrawStackFrameList(instruction.stack); EditorGUILayout.EndScrollView(); }
protected override void DoDrawInstruction(ListViewElement el, int id) { IMGUILayoutInstruction iMGUILayoutInstruction = this.m_LayoutInstructions[el.row]; GUIContent content = GUIContent.Temp(this.GetInstructionListName(el.row)); Rect position = el.position; position.xMin += (float)(iMGUILayoutInstruction.level * 10); GUIViewDebuggerWindow.s_Styles.listItemBackground.Draw(position, false, false, this.m_ListViewState.row == el.row, false); GUIViewDebuggerWindow.s_Styles.listItem.Draw(position, content, id, this.m_ListViewState.row == el.row); }
protected override void DoDrawInstruction(ListViewElement el, int id) { IMGUILayoutInstruction instruction = m_LayoutInstructions[el.row]; GUIContent tempContent = GUIContent.Temp(GetInstructionListName(el.row)); var rect = el.position; rect.xMin += instruction.level * 10; GUIViewDebuggerWindow.Styles.listItemBackground.Draw(rect, false, false, listViewState.row == el.row, false); GUIViewDebuggerWindow.Styles.listItem.Draw(rect, tempContent, id, listViewState.row == el.row); }
internal override string GetInstructionListName(int index) { IMGUILayoutInstruction instruction = this.m_LayoutInstructions[index]; StackFrame[] stack = instruction.stack; int interestingFrameIndex = this.GetInterestingFrameIndex(stack); if (interestingFrameIndex > 0) { interestingFrameIndex--; } StackFrame frame = stack[interestingFrameIndex]; return(frame.methodName); }
public override void ShowOverlay() { if (this.HasSelectedinstruction()) { IMGUILayoutInstruction iMGUILayoutInstruction = this.m_LayoutInstructions[this.m_ListViewState.row]; RectOffset rectOffset = new RectOffset(); rectOffset.left = iMGUILayoutInstruction.marginLeft; rectOffset.right = iMGUILayoutInstruction.marginRight; rectOffset.top = iMGUILayoutInstruction.marginTop; rectOffset.bottom = iMGUILayoutInstruction.marginBottom; this.m_FakeMargingStyleForOverlay.padding = rectOffset; Rect rect = iMGUILayoutInstruction.unclippedRect; rect = rectOffset.Add(rect); this.m_GuiViewDebuggerWindow.HighlightInstruction(this.m_GuiViewDebuggerWindow.m_Inspected, rect, this.m_FakeMargingStyleForOverlay); } }
public override void ShowOverlay() { if (this.HasSelectedinstruction()) { IMGUILayoutInstruction instruction = this.m_LayoutInstructions[base.m_ListViewState.row]; RectOffset offset = new RectOffset { left = instruction.marginLeft, right = instruction.marginRight, top = instruction.marginTop, bottom = instruction.marginBottom }; this.m_FakeMargingStyleForOverlay.padding = offset; Rect unclippedRect = instruction.unclippedRect; unclippedRect = offset.Add(unclippedRect); base.m_GuiViewDebuggerWindow.HighlightInstruction(base.m_GuiViewDebuggerWindow.m_Inspected, unclippedRect, this.m_FakeMargingStyleForOverlay); } }
internal override string GetInstructionListName(int index) { IMGUILayoutInstruction instruction = m_LayoutInstructions[index]; var stacktrace = instruction.stack; int frameIndex = GetInterestingFrameIndex(stacktrace); if (frameIndex > 0) { --frameIndex; } StackFrame interestingFrame = stacktrace[frameIndex]; string methodName = interestingFrame.methodName; return(methodName); }
public override void ShowOverlay() { if (!this.isInstructionSelected) { base.debuggerWindow.ClearInstructionHighlighter(); } else { IMGUILayoutInstruction iMGUILayoutInstruction = this.m_LayoutInstructions[base.listViewState.row]; RectOffset rectOffset = new RectOffset(); rectOffset.left = iMGUILayoutInstruction.marginLeft; rectOffset.right = iMGUILayoutInstruction.marginRight; rectOffset.top = iMGUILayoutInstruction.marginTop; rectOffset.bottom = iMGUILayoutInstruction.marginBottom; this.m_FakeMarginStyleForOverlay.padding = rectOffset; Rect rect = iMGUILayoutInstruction.unclippedRect; rect = rectOffset.Add(rect); base.debuggerWindow.HighlightInstruction(base.debuggerWindow.inspected, rect, this.m_FakeMarginStyleForOverlay); } }
internal override void DoDrawSelectedInstructionDetails(int index) { IMGUILayoutInstruction iMGUILayoutInstruction = this.m_LayoutInstructions[index]; using (new EditorGUI.DisabledScope(true)) { base.DrawInspectedRect(iMGUILayoutInstruction.unclippedRect); EditorGUILayout.IntField("margin.left", iMGUILayoutInstruction.marginLeft, new GUILayoutOption[0]); EditorGUILayout.IntField("margin.top", iMGUILayoutInstruction.marginTop, new GUILayoutOption[0]); EditorGUILayout.IntField("margin.right", iMGUILayoutInstruction.marginRight, new GUILayoutOption[0]); EditorGUILayout.IntField("margin.bottom", iMGUILayoutInstruction.marginBottom, new GUILayoutOption[0]); if (iMGUILayoutInstruction.style != null) { EditorGUILayout.LabelField("Style Name", iMGUILayoutInstruction.style.name, new GUILayoutOption[0]); } if (iMGUILayoutInstruction.isGroup != 1) { EditorGUILayout.Toggle("IsVertical", iMGUILayoutInstruction.isVertical == 1, new GUILayoutOption[0]); } } }
internal override void DoDrawSelectedInstructionDetails(int selectedInstructionIndex) { IMGUILayoutInstruction iMGUILayoutInstruction = this.m_LayoutInstructions[selectedInstructionIndex]; using (new EditorGUI.DisabledScope(true)) { base.DrawInspectedRect(iMGUILayoutInstruction.unclippedRect); } base.DoSelectableInstructionDataField("margin.left", iMGUILayoutInstruction.marginLeft.ToString()); base.DoSelectableInstructionDataField("margin.top", iMGUILayoutInstruction.marginTop.ToString()); base.DoSelectableInstructionDataField("margin.right", iMGUILayoutInstruction.marginRight.ToString()); base.DoSelectableInstructionDataField("margin.bottom", iMGUILayoutInstruction.marginBottom.ToString()); if (iMGUILayoutInstruction.style != null) { base.DoSelectableInstructionDataField("Style Name", iMGUILayoutInstruction.style.name); } if (iMGUILayoutInstruction.isGroup != 1) { base.DoSelectableInstructionDataField("IsVertical", (iMGUILayoutInstruction.isVertical == 1).ToString()); } }