internal void OnGUI()
{
if (Event.current.type != EventType.Layout)
{
if (s_Styles == null)
{
s_Styles = new Styles();
}
Rect position = new Rect(1f, 1f, base.position.width - 2f, base.position.height - 2f);
Rect viewRect = new Rect(0f, 0f, 1f, this.m_ContentHeight);
bool flag = this.m_ContentHeight > position.height;
float width = position.width;
if (flag)
{
width -= 14f;
}
this.m_ScrollPosition = GUI.BeginScrollView(position, this.m_ScrollPosition, viewRect);
this.Draw(width);
GUI.EndScrollView();
GUI.Label(new Rect(0f, 0f, base.position.width, base.position.height), GUIContent.none, s_Styles.background);
if (Event.current.type == EventType.MouseMove)
{
Event.current.Use();
}
if ((Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.Escape))
{
base.Close();
GUIUtility.ExitGUI();
}
}
}