/// <summary> /// Sets up the dialog with the proper message and time on when to select the default dialog selection /// </summary> /// <param name="messageTranslatedKey"></param> /// <param name="automaticallySelectDefaultAfterSeconds"></param> public void UpdateDialog(string messageTranslatedKey = null, float automaticallySelectDefaultAfterSeconds = -1f, BackgroundMenu.BackgroundType backgroundType = DefaultBackground, string titleTranslationKey = null, params object[] titleTranslationArgs) { // Setup the timer selectDefaultAfterSeconds = -1; if (automaticallySelectDefaultAfterSeconds > 0) { selectDefaultAfterSeconds = automaticallySelectDefaultAfterSeconds; } // Setup the label if (string.IsNullOrEmpty(messageTranslatedKey) == true) { // Simply remove the message label entirely messageLabel.gameObject.SetActive(false); } else { // Activate the message label messageLabel.gameObject.SetActive(true); if (selectDefaultAfterSeconds > 0) { // Update the label with time lastDisplayedSeconds = DisplayedTime; messageLabel.SetTranslationKey(messageTranslatedKey, lastDisplayedSeconds); } else { // Update label, no time messageLabel.TranslationKey = messageTranslatedKey; } } // Update background background.Update(backgroundType, titleTranslationKey, titleTranslationArgs); }
/// <summary> /// Sets up the dialog with the proper message and time on when to select the default dialog selection /// </summary> /// <param name="messageTranslatedKey"></param> /// <param name="automaticallySelectDefaultAfterSeconds"></param> public void UpdateDialog(BackgroundMenu.BackgroundType backgroundType = DefaultBackground, string titleTranslationKey = null, params object[] titleTranslationArgs) { // Update background background.Update(backgroundType, titleTranslationKey, titleTranslationArgs); }
public void Update(BackgroundMenu.BackgroundType backgroundType, string titleTranslationKey = null, params object[] titleTranslationArgs) { BackgroundState = backgroundType; TitleTranslationKey = titleTranslationKey; TitleTranslationArgs = titleTranslationArgs; }