/// <summary>
 /// General loading show
 /// </summary>
 /// <param name="loadingText"><B>[Optional]</B> a string to show on loading screen</param>
 /// <param name="loop"><B>[Optional]</B> determine if you want a looped progress bar or not, <B>if not</B> a normal progress bar is showed.</param>
 public void Show(string loadingText = "", bool loop = true)
 {
     text.text = loadingText;
     progressBar.gameObject.SetActive(!loop);
     loopProgressBar.SetActive(loop);
     isShown = true;
     transition.Show();
 }
Beispiel #2
0
 public void ShowInformation(string title, string description)
 {
     if (!enabled || modelsInfo.shown)
     {
         return;
     }
     this.title.text       = title;
     this.description.text = description;
     this.title.transform.parent.GetComponent <ContentSizeFitter>().enabled = false;
     Invoke("SetItActive", 0.2f);
     modelsInfo.Show();
 }
Beispiel #3
0
    /// <summary>
    /// Shows an overlay over the given rect area.
    /// </summary>
    /// <param name="rect">the rect that will be covered by the overlayLoading</param>
    public void Show(RectTransform rect)
    {
        UITransition  overlayImage = Instantiate(overlayPrefab, rect);
        RectTransform rt           = overlayImage.GetComponent <RectTransform>();

        rt.anchorMin = Vector2.zero;
        rt.anchorMax = Vector2.one;
        rt.sizeDelta = Vector2.zero;
        rt.SetParent(rect);
        rt.SetAsLastSibling();
        if (rt.GetComponentInParent <ScrollRect>())
        {
            rt.GetComponentInParent <ScrollRect>().enabled = false;
        }
        overlayImage.Show();
        overlayImage.onHidden.AddListener(delegate {
            Destroy(overlayImage.gameObject);
            if (rt.GetComponentInParent <ScrollRect>())
            {
                rt.GetComponentInParent <ScrollRect>().enabled = true;
            }
        });
        anchoredLoadings.Add(overlayImage);
    }
Beispiel #4
0
 private void ShowText()
 {
     text.gameObject.SetActive(true);
     transition.Show();
 }