public override void ShowPanel() { if (panel != null) { NGUIDialogueUIControls.SetControlActive(panel.gameObject, true); } }
/// <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); foreach (var button in buttons) { NGUIDialogueUIControls.SetControlActive(button.gameObject, value && button.visible); } if (timer != null) { NGUITools.SetActive(timer.gameObject, false); } if (pcName != null) { NGUIDialogueUIControls.SetControlActive(pcName.gameObject, value); } if (pcImage != null) { NGUIDialogueUIControls.SetControlActive(pcImage.gameObject, value); } if (panel != null) { NGUIDialogueUIControls.SetControlActive(panel.gameObject, value); } if (value == true) { if ((pcImage != null) && (pcPortraitTexture != null)) { pcImage.mainTexture = pcPortraitTexture; } if ((pcName != null) && (pcPortraitName != null)) { pcName.text = pcPortraitName; } } }
/// <summary> /// Starts the timer. /// </summary> /// <param name='timeout'> /// Timeout duration in seconds. /// </param> public override void StartTimer(float timeout) { if (timer != null) { if (nguiTimer == null) { NGUIDialogueUIControls.SetControlActive(timer.gameObject, true); nguiTimer = timer.GetComponent <NGUITimer>(); if (nguiTimer == null) { nguiTimer = timer.gameObject.AddComponent <NGUITimer>(); } NGUIDialogueUIControls.SetControlActive(timer.gameObject, false); } if (nguiTimer != null) { NGUIDialogueUIControls.SetControlActive(timer.gameObject, true); nguiTimer.StartCountdown(timeout, OnTimeout); } else { if (DialogueDebug.LogWarnings) { Debug.LogWarning(string.Format("{0}: No NGUITimer component found on timer", DialogueDebug.Prefix)); } } } }
public override void HideContinueButton() { if (continueButton != null) { NGUIDialogueUIControls.SetControlActive(continueButton.gameObject, false); } }
/// <summary> /// Sets the alert controls active. /// </summary> /// <param name='value'> /// <c>true</c> for active. /// </param> public override void SetActive(bool value) { if (line != null) { NGUIDialogueUIControls.SetControlActive(line.gameObject, value); } if (panel != null) { NGUIDialogueUIControls.SetControlActive(panel.gameObject, value); } }
/// <summary> /// Hides the QTE indicator specified by the index. /// </summary> /// <param name='index'> /// Zero-based index of the indicator. /// </param> public override void HideIndicator(int index) { if (IsValidQTEIndex(index) && IsQTEIndicatorVisible(index)) { if (qteIndicators[index] != null) { NGUIDialogueUIControls.SetControlActive(qteIndicators[index].gameObject, false); } numVisibleQTEIndicators--; } }
/// <summary> /// Sets the QTE controls active/inactive. /// </summary> /// <param name='value'> /// <c>true</c> for active; <c>false</c> for inactive. /// </param> public override void SetActive(bool value) { if (value == false) { numVisibleQTEIndicators = 0; foreach (var qteIndicator in qteIndicators) { if (qteIndicator.gameObject != null) { NGUIDialogueUIControls.SetControlActive(qteIndicator.gameObject, false); } } } }
public override void SetActive(bool value) { base.SetActive(value); if (panel != null) { NGUIDialogueUIControls.SetControlActive(panel.gameObject, value); } if (value == false) { if (npcSubtitle != null) { npcSubtitle.Hide(); } if (pcSubtitle != null) { pcSubtitle.Hide(); } if (responseMenu != null) { responseMenu.Hide(); } } }
/// <summary> /// Sets the subtitle controls active or inactive. /// </summary> /// <param name='value'> /// <c>true</c> for active; <c>false</c> for inactive. /// </param> public override void SetActive(bool value) { if (line != null) { NGUIDialogueUIControls.SetControlActive(line.gameObject, value); } if (portraitImage != null) { NGUIDialogueUIControls.SetControlActive(portraitImage.gameObject, value); } if (portraitName != null) { NGUIDialogueUIControls.SetControlActive(portraitName.gameObject, value); } if (continueButton != null) { NGUIDialogueUIControls.SetControlActive(continueButton.gameObject, value); } if (panel != null) { NGUIDialogueUIControls.SetControlActive(panel.gameObject, value); } }