private void SetStatusMessage(StatusType status, string message)
        {
            currentStatus = status;

            if (currentStatus == StatusType.Loading)
            {
                LoadingSpinner.Start();
            }
            else
            {
                LoadingSpinner.Stop();
            }

            UIUtils.SetElementDisplay(LoadingIcon, currentStatus == StatusType.Error);
            if (currentStatus == StatusType.Error)
            {
                LoadingText.AddToClassList("icon");
            }
            else
            {
                LoadingText.RemoveFromClassList("icon");
            }

            LoadingText.text    = message;
            LoadingText.tooltip = currentStatus != StatusType.Loading ? "Click to refresh packages" : string.Empty;
        }
Ejemplo n.º 2
0
        private void SetStatusMessage(StatusType status, string message)
        {
            if (status == StatusType.Loading)
            {
                LoadingSpinner.Start();
            }
            else
            {
                LoadingSpinner.Stop();
            }

            UIUtils.SetElementDisplay(LoadingIcon, status == StatusType.Error);
            if (status == StatusType.Error)
            {
                LoadingText.AddToClassList("icon");
            }
            else
            {
                LoadingText.RemoveFromClassList("icon");
            }

            LoadingText.text = message;
        }