private void ShowCompiledCodeButton(Shader s)
{
EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
EditorGUILayout.PrefixLabel("Compiled code", EditorStyles.miniButton);
bool flag = ShaderUtil.HasShaderSnippets(s) || ShaderUtil.HasSurfaceShaders(s) || ShaderUtil.HasFixedFunctionShaders(s);
if (flag)
{
GUIContent showCurrent = ShaderInspector.Styles.showCurrent;
Rect rect = GUILayoutUtility.GetRect(showCurrent, EditorStyles.miniButton, new GUILayoutOption[]
{
GUILayout.ExpandWidth(false)
});
Rect position = new Rect(rect.xMax - 16f, rect.y, 16f, rect.height);
if (EditorGUI.DropdownButton(position, GUIContent.none, FocusType.Passive, GUIStyle.none))
{
Rect last = GUILayoutUtility.topLevel.GetLast();
PopupWindow.Show(last, new ShaderInspectorPlatformsPopup(s));
GUIUtility.ExitGUI();
}
if (GUI.Button(rect, showCurrent, EditorStyles.miniButton))
{
ShaderUtil.OpenCompiledShader(s, ShaderInspectorPlatformsPopup.currentMode, ShaderInspectorPlatformsPopup.currentPlatformMask, ShaderInspectorPlatformsPopup.currentVariantStripping == 0);
GUIUtility.ExitGUI();
}
}
else
{
GUILayout.Button("none (precompiled shader)", GUI.skin.label, new GUILayoutOption[0]);
}
EditorGUILayout.EndHorizontal();
}