Esempio n. 1
0
        /// <summary>
        /// Set loading modal download progress
        /// </summary>
        /// <param name="p_Text"></param>
        /// <param name="p_Progress">Download progress</param>
        protected void SetLoadingModal_DownloadProgress(string p_Text, float p_Progress)
        {
            if (!UICreated)
            {
                Logger.Instance?.Error("[SDK.UI][ViewController] Set loading modal download progress \"" + p_Text + "\" called before View UI's creation");
                return;
            }

            if (m_LoadingModal_Spinner.gameObject.activeSelf)
            {
                m_LoadingModal_Spinner.ShowDownloadingProgress(p_Text, p_Progress);
            }
        }
Esempio n. 2
0
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Show the loading modal
        /// </summary>
        private void ShowLoadingModal(string p_Message = "Loading", bool p_Download = false)
        {
            /// Close old loading modal
            HideLoadingModal();

            /// Change modal text
            m_LoadingModalText = p_Download ? "" : p_Message;

            /// Update UI
            NotifyPropertyChanged("LoadingModalText");

            /// Show the modal
            m_ParserParams.EmitEvent("ShowLoadingModal");

            /// Show animator
            if (!p_Download)
            {
                m_LoadingModalSpinner.ShowLoading();
            }
            else
            {
                m_LoadingModalSpinner.ShowDownloadingProgress(p_Message, 0);
            }
        }