private void OnGUI() { float width = 10f; float width2 = 20f; float num = 32f; float num2 = 64f; float width3 = 80f; Toolbar.InitializeToolIcons(); bool isPlayingOrWillChangePlaymode = EditorApplication.isPlayingOrWillChangePlaymode; if (isPlayingOrWillChangePlaymode) { GUI.color = HostView.kPlayModeDarken; } GUIStyle gUIStyle = "AppToolbar"; if (Event.current.type == EventType.Repaint) { gUIStyle.Draw(new Rect(0f, 0f, base.position.width, base.position.height), false, false, false, false); } Rect pos = new Rect(0f, 0f, 0f, 0f); this.ReserveWidthRight(width, ref pos); this.ReserveWidthRight(num * 5f, ref pos); this.DoToolButtons(this.GetThickArea(pos)); this.ReserveWidthRight(width2, ref pos); this.ReserveWidthRight(num2 * 2f, ref pos); this.DoPivotButtons(this.GetThinArea(pos)); float num3 = 100f; pos = new Rect((base.position.width - num3) / 2f, 0f, 140f, 0f); GUILayout.BeginArea(this.GetThickArea(pos)); GUILayout.BeginHorizontal(new GUILayoutOption[0]); this.DoPlayButtons(isPlayingOrWillChangePlaymode); GUILayout.EndHorizontal(); GUILayout.EndArea(); pos = new Rect(base.position.width, 0f, 0f, 0f); this.ReserveWidthLeft(width, ref pos); this.ReserveWidthLeft(width3, ref pos); this.DoLayoutDropDown(this.GetThinArea(pos)); this.ReserveWidthLeft(width, ref pos); this.ReserveWidthLeft(width3, ref pos); this.DoLayersDropDown(this.GetThinArea(pos)); this.ReserveWidthLeft(width2, ref pos); this.ReserveWidthLeft(width3, ref pos); if (EditorGUI.ButtonMouseDown(this.GetThinArea(pos), new GUIContent("Account"), FocusType.Passive, "Dropdown")) { this.ShowUserMenu(this.GetThinArea(pos)); } this.ReserveWidthLeft(width, ref pos); this.ReserveWidthLeft(32f, ref pos); if (GUI.Button(this.GetThinArea(pos), Toolbar.s_CloudIcon, "Button")) { UnityConnectServiceCollection.instance.ShowService("Hub", true); } EditorGUI.ShowRepaints(); Highlighter.ControlHighlightGUI(this); }
private void OnGUI() { Toolbar.InitializeToolIcons(); bool isPlayingOrWillChangePlaymode = EditorApplication.isPlayingOrWillChangePlaymode; if (isPlayingOrWillChangePlaymode) { GUI.color = HostView.kPlayModeDarken; } GUIStyle gUIStyle = "AppToolbar"; if (Event.current.type == EventType.Repaint) { gUIStyle.Draw(new Rect(0f, 0f, base.position.width, base.position.height), false, false, false, false); } this.DoToolButtons(); float num = 100f; float num2 = (base.position.width - num) / 2f; num2 = Mathf.Max(num2, 373f); GUILayout.BeginArea(new Rect(num2, 5f, 120f, 24f)); GUILayout.BeginHorizontal(new GUILayoutOption[0]); this.DoPlayButtons(isPlayingOrWillChangePlaymode); GUILayout.EndHorizontal(); GUILayout.EndArea(); float num3 = 220f; num2 = base.position.width - num3; num2 = Mathf.Max(num2, 440f); GUILayout.BeginArea(new Rect(num2, 7f, base.position.width - num2 - 10f, 24f)); GUILayout.BeginHorizontal(new GUILayoutOption[0]); this.DoLayersDropDown(); GUILayout.Space(6f); this.DoLayoutDropDown(); GUILayout.EndArea(); EditorGUI.ShowRepaints(); Highlighter.ControlHighlightGUI(this); }