Ejemplo n.º 1
0
    void LoadSavedInfo()
    {
        string assetpath = Pvr_LoadingEditor.assetPath + typeof(CLoadingAsset).ToString() + ".asset";

        if (File.Exists(assetpath))
        {
            CLoadingAsset asset = AssetDatabase.LoadAssetAtPath <CLoadingAsset>(assetpath);
            enumSplashType = (ESplashScreenType)asset.SplashScreenType;
            SplashImage.Clear();
            int size = asset.splashImage.Count;
            for (int i = 0; i < size; i++)
            {
                SplashImage.Add(asset.splashImage[i]);
            }
            texInside_bg = asset.Inside_background;

            //SplashText
            toggleUseSplashText = asset.UseSplashText;
            strLanText[0]       = asset.DefaultText;
            strLanText[1]       = asset.ChineseText;
            strLanText[2]       = asset.EnglishText;
            strLanText[3]       = asset.JapaneseText;
            strLanText[4]       = asset.KoreanText;

            //other
            labelFontSize     = asset.FontSize;
            colorSplashText   = asset.FontColor;
            labelTextHeight   = asset.TextHeight;
            toggleUseCarousel = asset.UseCarousel;
            enumAlignment     = (ESplashTextAlignment)asset.SplashTextAlignment;
        }
    }
Ejemplo n.º 2
0
    void EditorOtherTextAttribute()
    {
        if (enumSplashType == ESplashScreenType.UseUnitySplashScreen || enumSplashType == ESplashScreenType.UsePicoSplashScreen)
        {
            return;
        }

        if (!toggleUseSplashText)
        {
            return;
        }

        EditorGUI.indentLevel = childIndentLevel;
        labelFontSize         = EditorGUILayout.TextField("FontSize", labelFontSize, GUILayout.Width(textwidth));

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("FontColor", GUILayout.Width(130));
        colorSplashText = EditorGUILayout.ColorField(colorSplashText, GUILayout.Width(textwidth * 0.71f));
        EditorGUILayout.EndHorizontal();

        labelTextHeight = EditorGUILayout.TextField("TextHeight", labelTextHeight, GUILayout.Width(textwidth));
        GUIStyle fontstyle = new GUIStyle();

        fontstyle.fontSize = 10;
        if (labelTextHeight == "")
        {
            labelTextHeight = "0";
        }
        EditorGUILayout.LabelField(" In pixels," + labelTextHeight + " at bottom", fontstyle);

        toggleUseCarousel = EditorToggle("Use Carousel", toggleUseCarousel, GUILayout.Width(128));
        EditorGUILayout.LabelField(" If the text is too long, enable the option and the text will scrolling display", fontstyle);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Alignment", GUILayout.Width(130));
        enumAlignment = (ESplashTextAlignment)EditorGUILayout.EnumPopup(enumAlignment, GUILayout.Width(200));
        EditorGUILayout.EndHorizontal();

        EditorGUI.indentLevel = 0;
    }