Ejemplo n.º 1
0
 public Hint GetHint(EHintType p_type)
 {
     foreach (Hint hint in m_hints)
     {
         if (hint.Type == p_type)
         {
             return(hint);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
        public void TriggerHint(EHintType p_type)
        {
            if (!m_active)
            {
                return;
            }
            Hint hint = GetHint(p_type);

            if (hint != null && !hint.Shown)
            {
                LegacyLogic.Instance.EventManager.InvokeEvent(hint, EEventType.SHOW_HINT, EventArgs.Empty);
            }
        }
Ejemplo n.º 3
0
    public static void Init(EHintType htype)
    {
        hintType = htype;
        myWindow = (Pvr_2DLoadingConfigureOkEditor)EditorWindow.GetWindow(typeof(Pvr_2DLoadingConfigureOkEditor), true, "Congratulations", true);
        myWindow.Show(true);
        Rect pos;

        if (Pvr_LoadingEditor.myWindow != null)
        {
            Rect frect = Pvr_LoadingEditor.myWindow.position;
            pos = new Rect(frect.x + 300, frect.y + 200, 200, 140);
        }
        else
        {
            pos = new Rect(700, 400, 200, 140);
        }
        myWindow.position = pos;
    }
 protected override void ParseExtra(String p_extra)
 {
     String[] array = p_extra.Split(new Char[]
     {
         ','
     });
     if (array.Length != 1)
     {
         throw new FormatException(String.Concat(new Object[]
         {
             "Could not parse interaction params ",
             p_extra,
             " because it contains ",
             array.Length,
             " arguments instead of ",
             1
         }));
     }
     m_hint = (EHintType)Enum.Parse(typeof(EHintType), array[0]);
 }
Ejemplo n.º 5
0
    void OnConfirmClick()
    {
        SaveAssetDataBase();
        EditorUtility.DisplayProgressBar("Configuring LoadingInfo", "", 0.3f);
        switch (enumSplashType)
        {
        case ESplashScreenType.UseUnitySplashScreen:
            UpdateAndroidManifestXML("platform_logo", "0");
            break;

        case ESplashScreenType.UsePicoSplashScreen:
            UpdateAndroidManifestXML("platform_logo", "1");
            break;
            //case ESplashScreenType.UseDynamicSplashScreen:
            //    UpdateAndroidManifestXML("platform_logo", "2");
            //    break;
        }
        if (enumSplashType == ESplashScreenType.UseUnitySplashScreen || enumSplashType == ESplashScreenType.UsePicoSplashScreen)
        {
            ShowHintInfo(EHintType.Success);
            return;
        }

        EditorUtility.DisplayProgressBar("Configuring LoadingInfo", "CopyTexture", 0.5f);
        EHintType etype = UpdateTexFile();

        if (etype == EHintType.SplashListNull || etype == EHintType.BackGroundNull)
        {
            ShowHintInfo(etype);
            return;
        }


        //xml
        EditorUtility.DisplayProgressBar("UpdateXml", "AndroidManifest...", 1 / (strLanguage.Length + 1));
        for (int i = 0; i < strLanguage.Length; i++)
        {
            EditorUtility.DisplayProgressBar("UpdateXml", strLanguage[i] + "...", i + 2 / (strLanguage.Length + 1));
            if (toggleUseSplashText)//LoadingText
            {
                UpdateOtherXml(strLanguage[i], "strings", "string", "loading", strLanText[i]);
            }
            else
            {
                UpdateOtherXml(strLanguage[i], "strings", "string", "loading", "");
            }

            string strcolor = ColorUtility.ToHtmlStringRGBA(colorSplashText);
            string stralpha = strcolor.Substring(6);
            string strrgb   = strcolor.Substring(0, 6);
            strcolor = "#" + stralpha + strrgb;


            UpdateOtherXml(strLanguage[i], "color", "color", "custom", strcolor); //font color
        }
        UpdateAndroidManifestXML("loadingtextsize", labelFontSize);               //font size

        //UseCarousel
        int useCarousel = toggleUseCarousel == true ? 1 : 0;

        UpdateAndroidManifestXML("loadingmarquee", useCarousel.ToString());

        //Text Height
        if (labelTextHeight != "")
        {
            UpdateAndroidManifestXML("loadingheight", labelTextHeight);
        }

        switch (enumAlignment)//alignment
        {
        case ESplashTextAlignment.Left:
            UpdateAndroidManifestXML("loadingalign", "left");
            break;

        case ESplashTextAlignment.Center:
            UpdateAndroidManifestXML("loadingalign", "mid");
            break;

        case ESplashTextAlignment.Right:
            UpdateAndroidManifestXML("loadingalign", "right");
            break;
        }

        ShowHintInfo(EHintType.Success);
        return;
    }
Ejemplo n.º 6
0
 void ShowHintInfo(EHintType etype)
 {
     EditorUtility.ClearProgressBar();
     Pvr_2DLoadingConfigureOkEditor.Init(etype);
 }