public override void OnPreviewSettings()
{
if (ShaderUtil.hardwareSupportsRectRenderTexture)
{
bool flag = this.m_Material.objectReferenceValue != null;
GUI.enabled = flag;
if (!flag)
{
this.m_PreviewShaded = false;
}
GUIContent content = !this.m_PreviewShaded ? Styles.m_Geometry : Styles.m_Shaded;
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(75f) };
Rect position = GUILayoutUtility.GetRect(content, Styles.m_DropdownButton, options);
if (EditorGUI.ButtonMouseDown(position, content, FocusType.Native, Styles.m_DropdownButton))
{
GUIUtility.hotControl = 0;
GenericMenu menu = new GenericMenu();
menu.AddItem(Styles.m_Shaded, this.m_PreviewShaded, (GenericMenu.MenuFunction) (() => (this.m_PreviewShaded = true)));
menu.AddItem(Styles.m_Geometry, !this.m_PreviewShaded, (GenericMenu.MenuFunction) (() => (this.m_PreviewShaded = false)));
menu.DropDown(position);
}
}
}