/// <summary> /// Sets the controls active/inactive, except this method never activates the timer. If the /// UI's display settings specify a timeout, then the UI will call StartTimer() to manually /// activate the timer. /// </summary> /// <param name='value'> /// Value (<c>true</c> for active; otherwise inactive). /// </param> public override void SetActive(bool value) { subtitleReminder.SetActive(value && subtitleReminder.HasText); Tools.SetGameObjectActive(buttonTemplate, false); foreach (var button in buttons) { if (button != null) { if (value == true) { Tools.SetGameObjectActive(button, button.visible); } else { button.clickable = false; } } } Tools.SetGameObjectActive(timer, false); Tools.SetGameObjectActive(pcName, value); Tools.SetGameObjectActive(pcImage, value); if (value == true) { if ((pcImage != null) && (pcPortraitSprite != null)) { pcImage.sprite = pcPortraitSprite; } if ((pcName != null) && (pcPortraitName != null)) { pcName.text = pcPortraitName; } Tools.SetGameObjectActive(panel, true); animationTransitions.ClearTriggers(showHideController); showHideController.Show(animationTransitions.showTrigger, false, null); if (explicitNavigationForTemplateButtons) { SetupTemplateButtonNavigation(); } } else { if (isVisible && CanTriggerAnimation(animationTransitions.hideTrigger)) { animationTransitions.ClearTriggers(showHideController); showHideController.Hide(animationTransitions.hideTrigger, DeactivateUIElements); } else { if (panel != null) { Tools.SetGameObjectActive(panel, false); } } } }
public virtual void Start() { if (subtitle != null) { subtitle.SetActive(false); } if (subtitleReminder != null) { subtitleReminder.SetActive(false); } if (responseMenu != null) { responseMenu.SetActive(false); } }