private static void OnPreferencesGUI(string search) { ToolbarVisible.DoGUI(); FullscreenOnPlayEnabled.DoGUI(); EditorGUILayout.Separator(); RectSource.DoGUI(); if (!IsRectModeSupported(RectSource)) { EditorGUILayout.HelpBox("The selected Rect Source mode is not supported on this platform", MessageType.Warning); } // Custom Rect switch (RectSource.Value) { case RectSourceMode.Custom: EditorGUI.indentLevel++; CustomRect.DoGUI(); var customRect = CustomRect.Value; if (customRect.width < 300f) { customRect.width = 300f; } if (customRect.height < 300f) { customRect.height = 300f; } CustomRect.Value = customRect; EditorGUI.indentLevel--; break; } DisableNotifications.DoGUI(); KeepFullscreenBelow.DoGUI(); DisableSceneViewRendering.DoGUI(); // Mosaic if (FullscreenRects.ScreenCount > 1) { EditorGUILayout.Separator(); EditorGUILayout.LabelField(MosaicMapping.Content, EditorStyles.boldLabel); EditorGUI.indentLevel++; GUI.changed = false; var mosaicMapping = MosaicMapping.Value; for (var i = 0; i < mosaicMapping.Length && i < FullscreenRects.ScreenCount; i++) { var val = EditorGUILayout.IntPopup(string.Format("Physical display {0} renders", i + 1), mosaicMapping[i], mosaicDropDownOptions, new [] { 0, 1, 2, 3, 4, 5, 6, 7 }); mosaicMapping[i] = val; } if (GUI.changed) { MosaicMapping.SaveValue(); } EditorGUI.indentLevel--; } }
private static void OnPreferencesGUI(string search) { if (FullscreenUtility.IsLinux) { EditorGUILayout.HelpBox("This plugin was not tested on Linux and its behaviour is unknown.", MessageType.Warning); } EditorGUILayout.Separator(); #if !UNITY_2018_3_OR_NEWER scroll.Value = EditorGUILayout.BeginScrollView(scroll); #endif EditorGUILayout.Separator(); ToolbarVisible.DoGUI(); FullscreenOnPlayEnabled.DoGUI(); EditorGUILayout.Separator(); RectSource.DoGUI(); DisableNotifications.DoGUI(); if (!IsRectModeSupported(RectSource)) { EditorGUILayout.HelpBox("The selected Rect Source mode is not supported on this platform", MessageType.Warning); } switch (RectSource.Value) { case RectSourceMode.Custom: EditorGUI.indentLevel++; CustomRect.DoGUI(); var customRect = CustomRect.Value; if (customRect.width < 300f) { customRect.width = 300f; } if (customRect.height < 300f) { customRect.height = 300f; } CustomRect.Value = customRect; EditorGUI.indentLevel--; break; } EditorGUILayout.Separator(); Shortcut.DoShortcutsGUI(); #if !UNITY_2018_3_OR_NEWER EditorGUILayout.EndScrollView(); #endif GUILayout.FlexibleSpace(); Func <GUIContent, bool> linkLabel = (label) => typeof(EditorGUILayout).InvokeMethod <bool>("LinkLabel", label, new GUILayoutOption[0]); using (new EditorGUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); if (linkLabel(new GUIContent("Consider leaving a review if you're enjoying Fullscreen Editor!", ASSET_STORE_PAGE))) { Application.OpenURL(ASSET_STORE_PAGE); } GUILayout.FlexibleSpace(); } using (new EditorGUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); for (var i = 0; i < links.Length; i++) { if (linkLabel(links[i])) { Application.OpenURL(links[i].tooltip); } GUILayout.Space(5f); } GUILayout.FlexibleSpace(); } EditorGUILayout.Separator(); using (new EditorGUILayout.HorizontalScope()) { if (GUILayout.Button(resetSettingsContent, GUILayout.Width(120f))) { onLoadDefaults(); } GUILayout.FlexibleSpace(); EditorGUILayout.LabelField(versionContent, GUILayout.Width(170f)); } EditorGUILayout.Separator(); }
private static void OnPreferencesGUI(string search) { ToolbarVisible.DoGUI(); FullscreenOnPlayEnabled.DoGUI(); EditorGUILayout.Separator(); RectSource.DoGUI(); if (RectSource.Value == RectSourceMode.AtMousePosition) { EditorGUILayout.HelpBox("\'At mouse position\' can cause slowdowns on large projects", MessageType.Warning); } if (!IsRectModeSupported(RectSource)) { EditorGUILayout.HelpBox("The selected placement source mode is not supported on this platform", MessageType.Warning); } // Custom Rect switch (RectSource.Value) { case RectSourceMode.Custom: EditorGUI.indentLevel++; CustomRect.DoGUI(); var customRect = CustomRect.Value; if (customRect.width < 300f) { customRect.width = 300f; } if (customRect.height < 300f) { customRect.height = 300f; } CustomRect.Value = customRect; EditorGUI.indentLevel--; break; } DisableNotifications.DoGUI(); KeepFullscreenBelow.DoGUI(); DisableSceneViewRendering.DoGUI(); UseGlobalToolbarHiding.DoGUI(); if (FullscreenUtility.IsLinux) { using (new EditorGUI.DisabledGroupScope(!FullscreenEditor.Linux.wmctrl.IsInstalled)) { DoNotUseWmctrl.DoGUI(); } if (!FullscreenEditor.Linux.wmctrl.IsInstalled) { EditorGUILayout.HelpBox("'wmctrl' not found. Try installing it with 'sudo apt-get install wmctrl'.", MessageType.Warning); } else { EditorGUILayout.HelpBox("Try enabling the option above if you're experiencing any kind of toolbars or offsets " + "while in fullscreen mode.\nDisabling 'wmctrl' can fix issues on some Linux environments when the window manager " + "does not handle fullscreen windows properly (I'm looking at you Ubuntu).", MessageType.Info); } } // Mosaic if (FullscreenRects.ScreenCount > 1) { EditorGUILayout.Separator(); EditorGUILayout.LabelField(MosaicMapping.Content, EditorStyles.boldLabel); EditorGUI.indentLevel++; GUI.changed = false; var mosaicMapping = MosaicMapping.Value; for (var i = 0; i < mosaicMapping.Length && i < FullscreenRects.ScreenCount; i++) { var val = EditorGUILayout.IntPopup(string.Format("Physical display {0} renders", i + 1), mosaicMapping[i], mosaicDropDownOptions, new [] { 0, 1, 2, 3, 4, 5, 6, 7 }); mosaicMapping[i] = val; } if (GUI.changed) { MosaicMapping.SaveValue(); } EditorGUI.indentLevel--; } }