Example #1
0
 public void SetLabelTextToReturnToMenu(TranslatedText label)
 {
     if ((label != null) && (string.IsNullOrEmpty(returnToTextTemplateTranslationKey) == false))
     {
         label.SetTranslationKey(returnToTextTemplateTranslationKey, TransitionManager.MainMenu.DisplayName);
     }
 }
Example #2
0
 void SetLabelTextTo(TranslatedText label, string templateKey, SceneInfo scene)
 {
     if ((label != null) && (string.IsNullOrEmpty(templateKey) == false) && (scene != null))
     {
         label.SetTranslationKey(templateKey, scene.DisplayName);
     }
 }
Example #3
0
        public void UpdateReason(Reason reason)
        {
            // Grab the web checker
            WebLocationChecker webChecker = null;

            if (Singleton.Instance.IsWebplayer == true)
            {
                webChecker = Singleton.Get <WebLocationChecker>();
            }

            if (showDebugInformation == true)
            {
                reason = Reason.JustTesting;
            }

            // 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;
            }
        }