Ejemplo n.º 1
0
 public void OnTitleHidden()
 {
     // Change the translation key
     if (string.IsNullOrEmpty(nextState.TitleTranslationKey) == false)
     {
         titleLabel.SetTranslationKey(nextState.TitleTranslationKey, nextState.TitleTranslationArgs);
     }
 }
Ejemplo n.º 2
0
 public void SetLabelTextToReturnToMenu(TranslatedTextMeshPro label)
 {
     if ((label != null) && (string.IsNullOrEmpty(returnToTextTemplateTranslationKey) == false))
     {
         label.SetTranslationKey(returnToTextTemplateTranslationKey, SceneChanger.MainMenu.DisplayName);
     }
 }
Ejemplo n.º 3
0
 public static void SetLabelTextTo(TranslatedTextMeshPro label, string templateKey, SceneInfo scene)
 {
     if ((label != null) && (string.IsNullOrEmpty(templateKey) == false) && (scene != null))
     {
         label.SetTranslationKey(templateKey, scene.DisplayName);
     }
 }
        protected override void OnSetup()
        {
            // Call base method
            base.OnSetup();

            // Setup all labels, if available
            if ((levelNameLabel != null) && (SceneChanger.CurrentScene != null))
            {
                levelNameLabel.SetTranslationKey(SceneChanger.CurrentScene.DisplayName);
            }

            // Show the start button if pause is implemented.
            startButton.gameObject.SetActive(CurrentSettings.StartState == StateOnStart.PauseOnStart);

            // Show the custom message if pause is implemented.
            customMessageLabel.gameObject.SetActive(CurrentSettings.ShowCustomMessage);

            // Show the mouse lock message if pause is implemented.
            mouseLockMessageLabel.gameObject.SetActive(CurrentSettings.ShowMouseLockMessageLabel);

            // Show divider if custom or mouse lock message is up
            //divider.SetActive(CurrentSettings.ShowCustomMessage || CurrentSettings.ShowMouseLockMessageLabel);
        }
Ejemplo n.º 5
0
        public void UpdateReason(Reason reason)
        {
            // Update the reason for this dialog to appear
            switch (reason)
            {
            case Reason.CannotConfirmDomain:
                // Update translation key
                reasonMessage.TranslationKey = cannotConfirmDomainMessageTranslationKey;
                break;

            case Reason.IsIncorrectDomain:
                if (WebChecker != null)
                {
                    // Setup translation key, with proper population of fields
                    reasonMessage.SetTranslationKey(domainDoesNotMatchMessageTranslationKey, WebChecker.RetrievedHostName);
                }
                else
                {
                    // Update translation key
                    reasonMessage.TranslationKey = gameIsNotGenuineMessageTranslationKey;
                }
                break;

            case Reason.JustTesting:
                // Overwrite the text: it's a test
                StringBuilder builder = new StringBuilder();
                builder.Append("This menu is just a test. ");
                Utility.BuildTestMessage(builder, WebChecker);
                reasonMessage.CurrentText = builder.ToString();
                break;

            default:
                // Update translation key
                reasonMessage.TranslationKey = gameIsNotGenuineMessageTranslationKey;
                break;
            }
        }