DialogueInteractable, DialogueTransitionController, and DialogueUIVisibility are reworked against the new UI layer: visibility is driven by UIStateController rather than each component toggling canvases itself, which removes the duplicated show/hide logic the two had accumulated. NPCStandIn now ignores the interact button while UIStateController reports a menu open, so pressing interact through an open panel no longer starts a conversation behind it. The yarnproject change is graph-editor node positions only. Co-Authored-By: Claude Opus 5 <[email protected]>
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using NightclubArcadia.UI;
|
|
using UnityEngine;
|
|
|
|
namespace NightclubArcadia.Dialogue
|
|
{
|
|
/// <summary>
|
|
/// Shows and hides the dialogue UI *without* deactivating its GameObject.
|
|
/// Forwards to <see cref="PanelVisibility"/> — kept as a thin wrapper so
|
|
/// existing call sites (NPCStandIn, DialogueInteractable,
|
|
/// DialogueTransitionController) continue to compile unchanged.
|
|
/// </summary>
|
|
public static class DialogueUIVisibility
|
|
{
|
|
/// <summary>
|
|
/// Makes the dialogue UI visible and interactive. Returns true if the
|
|
/// GameObject had to be re-activated (legacy scene state), in which
|
|
/// case the caller must wait one frame before rendering text so that
|
|
/// TMP's OnEnable can re-cache its Canvas.
|
|
/// </summary>
|
|
public static bool Show(GameObject dialogueUI) => PanelVisibility.Show(dialogueUI);
|
|
|
|
/// <summary>
|
|
/// Hides the dialogue UI, leaving the hierarchy active. See
|
|
/// <see cref="PanelVisibility"/>.
|
|
/// </summary>
|
|
public static void Hide(GameObject dialogueUI) => PanelVisibility.Hide(dialogueUI);
|
|
}
|
|
}
|