private void DoToolbarGUI()
{
GUILayout.BeginHorizontal("toolbar", new GUILayoutOption[0]);
GUIContent gUIContent = SceneRenderModeWindow.GetGUIContent(this.m_RenderMode);
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(120f) };
if (EditorGUI.ButtonMouseDown(GUILayoutUtility.GetRect(gUIContent, EditorStyles.toolbarDropDown, options), gUIContent, FocusType.Passive, EditorStyles.toolbarDropDown))
{
PopupWindow.Show(GUILayoutUtility.topLevel.GetLast(), new SceneRenderModeWindow(this));
GUIUtility.ExitGUI();
}
EditorGUILayout.Space();
this.in2DMode = GUILayout.Toggle(this.in2DMode, this.m_2DModeContent, "toolbarbutton", new GUILayoutOption[0]);
EditorGUILayout.Space();
this.m_SceneLighting = GUILayout.Toggle(this.m_SceneLighting, this.m_Lighting, "toolbarbutton", new GUILayoutOption[0]);
if (this.renderMode == DrawCameraMode.ShadowCascades)
{
this.m_SceneLighting = true;
}
GUI.enabled = !Application.isPlaying;
GUI.changed = false;
this.m_AudioPlay = GUILayout.Toggle(this.m_AudioPlay, this.m_AudioPlayContent, EditorStyles.toolbarButton, new GUILayoutOption[0]);
if (GUI.changed)
{
this.RefreshAudioPlay();
}
GUI.enabled = true;
Rect rect = GUILayoutUtility.GetRect(this.m_Fx, this.effectsDropDownStyle);
Rect position = new Rect(rect.xMax - this.effectsDropDownStyle.border.right, rect.y, (float) this.effectsDropDownStyle.border.right, rect.height);
if (EditorGUI.ButtonMouseDown(position, GUIContent.none, FocusType.Passive, GUIStyle.none))
{
PopupWindow.Show(GUILayoutUtility.topLevel.GetLast(), new SceneFXWindow(this));
GUIUtility.ExitGUI();
}
bool flag = GUI.Toggle(rect, this.m_SceneViewState.IsAllOn(), this.m_Fx, this.effectsDropDownStyle);
if (flag != this.m_SceneViewState.IsAllOn())
{
this.m_SceneViewState.Toggle(flag);
}
EditorGUILayout.Space();
GUILayout.FlexibleSpace();
if (((this.m_MainViewControlID != GUIUtility.keyboardControl) && (Event.current.type == EventType.KeyDown)) && !string.IsNullOrEmpty(base.m_SearchFilter))
{
switch (Event.current.keyCode)
{
case KeyCode.UpArrow:
case KeyCode.DownArrow:
if (Event.current.keyCode == KeyCode.UpArrow)
{
base.SelectPreviousSearchResult();
}
else
{
base.SelectNextSearchResult();
}
this.FrameSelected(false);
Event.current.Use();
GUIUtility.ExitGUI();
return;
}
}
if (RenderDoc.IsLoaded())
{
using (new EditorGUI.DisabledScope(!RenderDoc.IsSupported()))
{
if (GUILayout.Button(this.m_RenderDocContent, EditorStyles.toolbarButton, new GUILayoutOption[0]))
{
base.m_Parent.CaptureRenderDoc();
GUIUtility.ExitGUI();
}
}
}
if (EditorGUI.ButtonMouseDown(GUILayoutUtility.GetRect(this.m_GizmosContent, EditorStyles.toolbarDropDown), this.m_GizmosContent, FocusType.Passive, EditorStyles.toolbarDropDown) && AnnotationWindow.ShowAtPosition(GUILayoutUtility.topLevel.GetLast(), false))
{
GUIUtility.ExitGUI();
}
GUILayout.Space(6f);
base.SearchFieldGUI(EditorGUILayout.kLabelFloatMaxW);
GUILayout.EndHorizontal();
}