Example #1
0
        protected override void OnDisable()
        {
            m_Window = null;
            base.OnDisable();

            // BackUpDevicePreview ();
        }
 static void UpdateAll()
 {
     if (ResolutionGalleryWindow.IsOpen())
     {
         ResolutionGalleryWindow.m_Window.UpdateAllRequiredResolutions();
     }
     else if (ResolutionPreviewWindow.IsOpen())
     {
         ResolutionPreviewWindow.m_Window.UpdateAllRequiredResolutions();
     }
 }
 static void UpdateAll()
 {
     if (ResolutionGalleryWindow.IsOpen())
     {
         ResolutionGalleryWindow.m_Window.Export();
     }
     else if (ResolutionPreviewWindow.IsOpen())
     {
         ResolutionPreviewWindow.m_Window.Export();
     }
 }
        void OnGUI()
        {
            InitAllGameviewSizes();

            serializedObject.Update();
            EditorGUI.BeginChangeCheck();


            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
            if (GUILayout.Button("Gallery Preview", EditorStyles.toolbarButton))
            {
                ResolutionGalleryWindow.Init();
            }
            if (GUILayout.Button("Device Preview", EditorStyles.toolbarButton))
            {
                ResolutionPreviewWindow.Init();
            }
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("About", EditorStyles.toolbarButton))
            {
                UniversalDevicePreview.About();
            }
            EditorGUILayout.EndHorizontal();



            m_ScrollPos = EditorGUILayout.BeginScrollView(m_ScrollPos);

            EditorGUILayout.Separator();
            DrawConfig();
            EditorGUILayout.Separator();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            DrawSupportGUI();


            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            DrawContactGUI();

            EditorGUILayout.EndScrollView();


            if (EditorGUI.EndChangeCheck())
            {
                ResolutionWindowBase.RepaintWindows();
            }

            serializedObject.ApplyModifiedProperties();
        }
 public static void RepaintWindows()
 {
     if (ResolutionGalleryWindow.IsOpen())
     {
         ResolutionGalleryWindow.m_Window.Repaint();
     }
     if (ResolutionPreviewWindow.IsOpen())
     {
         ResolutionPreviewWindow.m_Window.Repaint();
     }
     if (ResolutionSettingsWindow.IsOpen())
     {
         ResolutionSettingsWindow.m_Window.Repaint();
     }
 }
        protected virtual List <ScreenshotResolution> GetResolutionsToUpdate()
        {
            List <ScreenshotResolution> resolutions = new List <ScreenshotResolution>();

            // Look if the preview or gallery window is open
            if (ResolutionGalleryWindow.IsOpen())
            {
                // If the gallery is open, we update all resolutions
                resolutions.AddRange(m_ConfigAsset.m_Config.GetActiveResolutions());
            }
            else if (ResolutionPreviewWindow.IsOpen())
            {
                // If only the preview is open, we only update the selected resolution
                if (m_ConfigAsset.m_Selected < m_ConfigAsset.m_Config.GetActiveResolutions().Count)
                {
                    resolutions.Add(m_ConfigAsset.m_Config.GetActiveResolutions()[m_ConfigAsset.m_Selected]);
                }
            }

            return(resolutions);
        }
Example #7
0
 protected override void OnEnable()
 {
     m_Window = this;
     base.OnEnable();
 }
Example #8
0
        public static void Init()
        {
            ResolutionGalleryWindow window = (ResolutionGalleryWindow)EditorWindow.GetWindow(typeof(ResolutionGalleryWindow), false, "Gallery");

            window.Show();
        }