public override void OnGUI(Rect windowRect) { Event current = Event.current; if (current.type == EventType.Layout) { return; } if (PopupList.s_Styles == null) { PopupList.s_Styles = new PopupList.Styles(); } if (current.type == EventType.KeyDown && current.keyCode == KeyCode.Escape) { base.editorWindow.Close(); GUIUtility.ExitGUI(); } if (this.m_Gravity == PopupList.Gravity.Bottom) { this.DrawList(base.editorWindow, windowRect); this.DrawCustomTextField(base.editorWindow, windowRect); } else { this.DrawCustomTextField(base.editorWindow, windowRect); this.DrawList(base.editorWindow, windowRect); } if (current.type == EventType.Repaint) { PopupList.s_Styles.background.Draw(new Rect(0f, 0f, windowRect.width, windowRect.height), false, false, false, false); } }
public override void OnGUI(Rect windowRect) { Event current = Event.current; if (current.type == EventType.Layout) return; if (PopupList.s_Styles == null) PopupList.s_Styles = new PopupList.Styles(); if (current.type == EventType.KeyDown && current.keyCode == KeyCode.Escape) { this.editorWindow.Close(); GUIUtility.ExitGUI(); } if (this.m_Gravity == PopupList.Gravity.Bottom) { this.DrawList(this.editorWindow, windowRect); this.DrawCustomTextField(this.editorWindow, windowRect); } else { this.DrawCustomTextField(this.editorWindow, windowRect); this.DrawList(this.editorWindow, windowRect); } if (current.type != EventType.Repaint) return; PopupList.s_Styles.background.Draw(new Rect(windowRect.x, windowRect.y, windowRect.width, windowRect.height), false, false, false, false); }