コード例 #1
0
        private bool ScaledImageGroup(string groupLabel, MetroScaledImageGroup images)
        {
            string text = EditorGUIUtility.TextContent(groupLabel).text;

            if (!images.unfolded)
            {
                string str2 = " (";
                foreach (MetroScaledImage image in images.images)
                {
                    if (!string.IsNullOrEmpty(PlayerSettings.WSA.GetVisualAssetsImage(image.type, image.scale)))
                    {
                        str2 = str2 + ((int)image.scale) + ",";
                    }
                }
                if (str2 != " (")
                {
                    str2 = str2.Substring(0, str2.Length - 1) + ")";
                    text = text + str2;
                }
            }
            bool flag = EditorGUILayout.Foldout(images.unfolded, text);

            if (flag)
            {
                foreach (MetroScaledImage image2 in images.images)
                {
                    this.ImageField(image2, EditorGUIUtility.TextContent(image2.label));
                }
            }
            return(flag);
        }
コード例 #2
0
 public override void OnEnable(PlayerSettingsEditor settingsEditor)
 {
     this.m_SettingsEditor                          = settingsEditor;
     this.m_GUIDefaultIsFullScreen                  = EditorGUIUtility.TextContent("Default Is Full Screen*");
     this.m_CompanyName                             = settingsEditor.FindPropertyAssert("companyName");
     this.m_ProductName                             = settingsEditor.FindPropertyAssert("productName");
     this.m_DefaultIsFullScreen                     = settingsEditor.FindPropertyAssert("defaultIsFullScreen");
     this.m_RunInBackground                         = settingsEditor.FindPropertyAssert("runInBackground");
     this.m_MetroPackageName                        = settingsEditor.FindPropertyAssert("metroPackageName");
     this.m_MetroPackageName.stringValue            = Utility.TryValidatePackageName(this.m_MetroPackageName.stringValue);
     this.m_MetroPackageVersion                     = settingsEditor.FindPropertyAssert("metroPackageVersion");
     this.m_MetroPackageVersion.stringValue         = PlayerSettings.WSA.ValidatePackageVersion(this.m_MetroPackageVersion.stringValue);
     this.m_MetroApplicationDescription             = settingsEditor.FindPropertyAssert("metroApplicationDescription");
     this.m_MetroApplicationDescription.stringValue = this.ValidateMetroApplicationDescription(this.m_MetroApplicationDescription.stringValue);
     this.m_MetroTileShortName                      = settingsEditor.FindPropertyAssert("metroTileShortName");
     this.m_MetroTileShortName.stringValue          = this.ValidateMetroTileShortName(this.m_MetroTileShortName.stringValue);
     this.m_MetroTileBackgroundColor                = settingsEditor.FindPropertyAssert("metroTileBackgroundColor");
     this.m_MetroFTAName                            = settingsEditor.FindPropertyAssert("metroFTAName");
     this.m_MetroFTAFileTypes                       = settingsEditor.FindPropertyAssert("metroFTAFileTypes");
     this.m_MetroProtocolName                       = settingsEditor.FindPropertyAssert("metroProtocolName");
     PlayerSettings.WSAImageScale[] scales      = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._80 };
     PlayerSettings.WSAImageScale[] scaleArray2 = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 };
     PlayerSettings.WSAImageScale[] scaleArray3 = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 };
     this.m_PackageLogos = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PackageLogo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 }, "Scale {0}% ({1}x{2} pixels)|Specifies the image that appears on the Store description page for the product.", new int[] { 50, 0x3f, 70, 0x4b, 90, 100, 120, 200 });
     MetroScaledImage[] sourceArray      = CreateScaledSquareImages(PlayerSettings.WSAImageType.StoreTileSmallLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image that is shown when viewing all installed applications.", new int[] { 0x18, 30, 0x2a, 0x36 });
     MetroScaledImage[] imageArray2      = CreateScaledSquareImages(PlayerSettings.WSAImageType.StoreTileSmallLogo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale.Target16 }, "Target size {0} ({1}x{2} pixels)|Specifies the image that is shown when viewing all installed applications.", new int[] { 0x10, 0x20, 0x30, 0x100 });
     MetroScaledImage[] destinationArray = new MetroScaledImage[sourceArray.Length + imageArray2.Length];
     Array.Copy(sourceArray, destinationArray, sourceArray.Length);
     Array.Copy(imageArray2, 0, destinationArray, sourceArray.Length, imageArray2.Length);
     this.m_StoreSmallLogos  = new MetroScaledImageGroup(destinationArray);
     this.m_MediumTiles      = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreTileLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile in Windows.", new int[] { 120, 150, 210, 270 });
     this.m_WideTiles        = CreateScaledImageGroup(PlayerSettings.WSAImageType.StoreTileWideLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's wide tile in Windows if supported.", new int[] { 0xf8, 310, 0x1b2, 0x22e }, new int[] { 120, 150, 210, 270 });
     this.m_SmallTiles       = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreSmallTile, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile in Windows if supported.", new int[] { 0x38, 70, 0x62, 0x7e });
     this.m_LargeTiles       = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreLargeTile, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's large tile in Windows if supported.", new int[] { 0xf8, 310, 0x1b2, 0x22e });
     this.m_PhoneAppIcons    = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneAppIcon, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile.", new int[] { 0x2c, 0x3e, 0x6a });
     this.m_PhoneSmallTiles  = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneSmallTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile", new int[] { 0x47, 0x63, 170 });
     this.m_PhoneMediumTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneMediumTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 150, 210, 360 });
     this.m_PhoneWideTiles   = CreateScaledImageGroup(PlayerSettings.WSAImageType.PhoneWideTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's wide tile.", new int[] { 310, 0x1b2, 0x2e8 }, new int[] { 150, 210, 360 });
     MetroScaledImage[] imageArray4 = CreateScaledSquareImages(PlayerSettings.WSAImageType.UWPSquare44x44Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x2c, 0x37, 0x42, 0x58, 0xb0 });
     MetroScaledImage[] imageArray5 = CreateScaledSquareImages(PlayerSettings.WSAImageType.UWPSquare44x44Logo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale.Target16 }, "Target size {0} ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x10, 0x18, 0x30, 0x100 });
     MetroScaledImage[] imageArray6 = new MetroScaledImage[imageArray4.Length + imageArray5.Length];
     Array.Copy(imageArray4, imageArray6, imageArray4.Length);
     Array.Copy(imageArray5, 0, imageArray6, imageArray4.Length, imageArray5.Length);
     this.m_UWPSquare44x44Logos            = new MetroScaledImageGroup(imageArray6);
     this.m_UWPSquare71x71Logos            = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare71x71Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x47, 0x59, 0x6b, 0x8e, 0x11c });
     this.m_UWPSquare150x150Logos          = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare150x150Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 150, 0xbc, 0xe1, 300, 600 });
     this.m_UWPSquare310x310Logos          = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare310x310Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 310, 0x184, 0x1d1, 620, 0x4d8 });
     this.m_UWPWide310x150Logos            = CreateScaledImageGroup(PlayerSettings.WSAImageType.UWPWide310x150Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 310, 0x184, 0x1d1, 620, 0x4d8 }, new int[] { 150, 0xbc, 0xe1, 300, 600 });
     this.m_WindowsSplashScreens           = CreateScaledImages(PlayerSettings.WSAImageType.SplashScreenImage, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 }, "Scale {0}% ({1}x{2} pixels)|Sets the foreground image for the app's splash screen.", new int[] { 620, 0x307, 0x364, 930, 0x45c, 0x4d8, 0x9b0 }, new int[] { 300, 0x177, 420, 450, 540, 600, 0x4b0 });
     this.m_PhoneSplashScreens             = CreateScaledImages(PlayerSettings.WSAImageType.PhoneSplashScreen, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Sets the foreground image for the app's splash screen.", new int[] { 480, 0x2a0, 0x480 }, new int[] { 800, 0x460, 0x780 });
     this.m_HolographicSplashScreen        = settingsEditor.FindPropertyAssert("m_VirtualRealitySplashScreen");
     this.m_HolographicPauseOnTrackingLoss = settingsEditor.FindPropertyAssert("m_HolographicPauseOnTrackingLoss");
     this.m_HolographicTrackingLossScreen  = settingsEditor.FindPropertyAssert("m_HolographicTrackingLossScreen");
 }
コード例 #3
0
 private bool ScaledImageGroup(string groupLabel, MetroScaledImageGroup images)
 {
     string text = EditorGUIUtility.TextContent(groupLabel).text;
     if (!images.unfolded)
     {
         string str2 = " (";
         foreach (MetroScaledImage image in images.images)
         {
             if (!string.IsNullOrEmpty(PlayerSettings.WSA.GetVisualAssetsImage(image.type, image.scale)))
             {
                 str2 = str2 + ((int) image.scale) + ",";
             }
         }
         if (str2 != " (")
         {
             str2 = str2.Substring(0, str2.Length - 1) + ")";
             text = text + str2;
         }
     }
     bool flag = EditorGUILayout.Foldout(images.unfolded, text);
     if (flag)
     {
         foreach (MetroScaledImage image2 in images.images)
         {
             this.ImageField(image2, EditorGUIUtility.TextContent(image2.label));
         }
     }
     return flag;
 }
コード例 #4
0
 public override void OnEnable(PlayerSettingsEditor settingsEditor)
 {
     this.m_SettingsEditor = settingsEditor;
     this.m_GUIDefaultIsFullScreen = EditorGUIUtility.TextContent("Default Is Full Screen*");
     this.m_CompanyName = settingsEditor.FindPropertyAssert("companyName");
     this.m_ProductName = settingsEditor.FindPropertyAssert("productName");
     this.m_DefaultIsFullScreen = settingsEditor.FindPropertyAssert("defaultIsFullScreen");
     this.m_RunInBackground = settingsEditor.FindPropertyAssert("runInBackground");
     this.m_MetroPackageName = settingsEditor.FindPropertyAssert("metroPackageName");
     this.m_MetroPackageName.stringValue = Utility.TryValidatePackageName(this.m_MetroPackageName.stringValue);
     this.m_MetroPackageVersion = settingsEditor.FindPropertyAssert("metroPackageVersion");
     this.m_MetroPackageVersion.stringValue = PlayerSettings.WSA.ValidatePackageVersion(this.m_MetroPackageVersion.stringValue);
     this.m_MetroApplicationDescription = settingsEditor.FindPropertyAssert("metroApplicationDescription");
     this.m_MetroApplicationDescription.stringValue = this.ValidateMetroApplicationDescription(this.m_MetroApplicationDescription.stringValue);
     this.m_MetroTileShortName = settingsEditor.FindPropertyAssert("metroTileShortName");
     this.m_MetroTileShortName.stringValue = this.ValidateMetroTileShortName(this.m_MetroTileShortName.stringValue);
     this.m_MetroTileBackgroundColor = settingsEditor.FindPropertyAssert("metroTileBackgroundColor");
     this.m_MetroFTAName = settingsEditor.FindPropertyAssert("metroFTAName");
     this.m_MetroFTAFileTypes = settingsEditor.FindPropertyAssert("metroFTAFileTypes");
     this.m_MetroProtocolName = settingsEditor.FindPropertyAssert("metroProtocolName");
     PlayerSettings.WSAImageScale[] scales = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._80 };
     PlayerSettings.WSAImageScale[] scaleArray2 = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 };
     PlayerSettings.WSAImageScale[] scaleArray3 = new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 };
     this.m_PackageLogos = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PackageLogo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 }, "Scale {0}% ({1}x{2} pixels)|Specifies the image that appears on the Store description page for the product.", new int[] { 50, 0x3f, 70, 0x4b, 90, 100, 120, 200 });
     MetroScaledImage[] sourceArray = CreateScaledSquareImages(PlayerSettings.WSAImageType.StoreTileSmallLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image that is shown when viewing all installed applications.", new int[] { 0x18, 30, 0x2a, 0x36 });
     MetroScaledImage[] imageArray2 = CreateScaledSquareImages(PlayerSettings.WSAImageType.StoreTileSmallLogo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale.Target16 }, "Target size {0} ({1}x{2} pixels)|Specifies the image that is shown when viewing all installed applications.", new int[] { 0x10, 0x20, 0x30, 0x100 });
     MetroScaledImage[] destinationArray = new MetroScaledImage[sourceArray.Length + imageArray2.Length];
     Array.Copy(sourceArray, destinationArray, sourceArray.Length);
     Array.Copy(imageArray2, 0, destinationArray, sourceArray.Length, imageArray2.Length);
     this.m_StoreSmallLogos = new MetroScaledImageGroup(destinationArray);
     this.m_MediumTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreTileLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile in Windows.", new int[] { 120, 150, 210, 270 });
     this.m_WideTiles = CreateScaledImageGroup(PlayerSettings.WSAImageType.StoreTileWideLogo, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's wide tile in Windows if supported.", new int[] { 0xf8, 310, 0x1b2, 0x22e }, new int[] { 120, 150, 210, 270 });
     this.m_SmallTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreSmallTile, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile in Windows if supported.", new int[] { 0x38, 70, 0x62, 0x7e });
     this.m_LargeTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.StoreLargeTile, scales, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's large tile in Windows if supported.", new int[] { 0xf8, 310, 0x1b2, 0x22e });
     this.m_PhoneAppIcons = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneAppIcon, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile.", new int[] { 0x2c, 0x3e, 0x6a });
     this.m_PhoneSmallTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneSmallTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's small tile", new int[] { 0x47, 0x63, 170 });
     this.m_PhoneMediumTiles = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.PhoneMediumTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 150, 210, 360 });
     this.m_PhoneWideTiles = CreateScaledImageGroup(PlayerSettings.WSAImageType.PhoneWideTile, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's wide tile.", new int[] { 310, 0x1b2, 0x2e8 }, new int[] { 150, 210, 360 });
     MetroScaledImage[] imageArray4 = CreateScaledSquareImages(PlayerSettings.WSAImageType.UWPSquare44x44Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x2c, 0x37, 0x42, 0x58, 0xb0 });
     MetroScaledImage[] imageArray5 = CreateScaledSquareImages(PlayerSettings.WSAImageType.UWPSquare44x44Logo, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale.Target16 }, "Target size {0} ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x10, 0x18, 0x30, 0x100 });
     MetroScaledImage[] imageArray6 = new MetroScaledImage[imageArray4.Length + imageArray5.Length];
     Array.Copy(imageArray4, imageArray6, imageArray4.Length);
     Array.Copy(imageArray5, 0, imageArray6, imageArray4.Length, imageArray5.Length);
     this.m_UWPSquare44x44Logos = new MetroScaledImageGroup(imageArray6);
     this.m_UWPSquare71x71Logos = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare71x71Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 0x47, 0x59, 0x6b, 0x8e, 0x11c });
     this.m_UWPSquare150x150Logos = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare150x150Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 150, 0xbc, 0xe1, 300, 600 });
     this.m_UWPSquare310x310Logos = CreateScaledSquareImageGroup(PlayerSettings.WSAImageType.UWPSquare310x310Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 310, 0x184, 0x1d1, 620, 0x4d8 });
     this.m_UWPWide310x150Logos = CreateScaledImageGroup(PlayerSettings.WSAImageType.UWPWide310x150Logo, scaleArray3, "Scale {0}% ({1}x{2} pixels)|Specifies the image to display on the app's tile.", new int[] { 310, 0x184, 0x1d1, 620, 0x4d8 }, new int[] { 150, 0xbc, 0xe1, 300, 600 });
     this.m_WindowsSplashScreens = CreateScaledImages(PlayerSettings.WSAImageType.SplashScreenImage, new PlayerSettings.WSAImageScale[] { PlayerSettings.WSAImageScale._100 }, "Scale {0}% ({1}x{2} pixels)|Sets the foreground image for the app's splash screen.", new int[] { 620, 0x307, 0x364, 930, 0x45c, 0x4d8, 0x9b0 }, new int[] { 300, 0x177, 420, 450, 540, 600, 0x4b0 });
     this.m_PhoneSplashScreens = CreateScaledImages(PlayerSettings.WSAImageType.PhoneSplashScreen, scaleArray2, "Scale {0}% ({1}x{2} pixels)|Sets the foreground image for the app's splash screen.", new int[] { 480, 0x2a0, 0x480 }, new int[] { 800, 0x460, 0x780 });
     this.m_HolographicSplashScreen = settingsEditor.FindPropertyAssert("m_VirtualRealitySplashScreen");
     this.m_HolographicPauseOnTrackingLoss = settingsEditor.FindPropertyAssert("m_HolographicPauseOnTrackingLoss");
     this.m_HolographicTrackingLossScreen = settingsEditor.FindPropertyAssert("m_HolographicTrackingLossScreen");
 }