fzhangtj 6 年前
当前提交
cd5c129a
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 13
      Runtime/debugger/inspector_window.cs

13
Runtime/debugger/inspector_window.cs


readonly List<InspectorPanel> m_Panels = new List<InspectorPanel>();
Rect _debugPaintTogglesRect;
Rect m_DebugPaintTogglesRect;
int m_PanelIndex = 0;
[SerializeField] List<PanelState> m_PanelStates = new List<PanelState>();

}
void OnGUI() {
GUILayout.BeginHorizontal(EditorStyles.toolbar, GUILayout.ExpandWidth(true));
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, GUILayout.ExpandWidth(true));
this.DoSelectDropDown();
bool needDebugPaintUpdate = false;

}
if (Event.current.type == EventType.Repaint) {
this._debugPaintTogglesRect = new Rect(r.xMax - debugPaintToggleGroupWidth, r.yMax + 2,
this.m_DebugPaintTogglesRect = new Rect(r.xMax - debugPaintToggleGroupWidth, r.yMax + 2,
debugPaintToggleGroupWidth, debugPaintToggleGroupHeight);
}

bool shouldHandleGUI = true;
if (Event.current.type == EventType.MouseDown || Event.current.type == EventType.MouseUp) {
if (this.m_ShowDebugPaintToggles && this._debugPaintTogglesRect.Contains(Event.current.mousePosition)) {
if (this.m_ShowDebugPaintToggles && this.m_DebugPaintTogglesRect.Contains(Event.current.mousePosition)) {
shouldHandleGUI = false;
}
}

}
void DebugPaintToggles(ref bool needUpdate) {
//GUI.skin.box
GUILayout.BeginArea(this._debugPaintTogglesRect, GUI.skin.box);
GUILayout.BeginArea(this.m_DebugPaintTogglesRect, GUI.skin.box);
GUILayout.BeginVertical();
EditorGUI.BeginChangeCheck();
GUILayout.Space(4);

GUILayout.EndArea();
if (Event.current.type == EventType.MouseDown &&
!this._debugPaintTogglesRect.Contains(Event.current.mousePosition)) {
!this.m_DebugPaintTogglesRect.Contains(Event.current.mousePosition)) {
this.ScheduleUpdateAction(() => {
this.m_ShowDebugPaintToggles = false;
this.Repaint();

正在加载...
取消
保存