Refine UI stack and add Ashwick keypad puzzle
This commit is contained in:
@@ -20,7 +20,7 @@ using VContainer;
|
||||
|
||||
namespace BriarQueen.UI.Menus
|
||||
{
|
||||
public class PauseMenuWindow : MonoBehaviour, IUIWindow
|
||||
public class PauseMenuWindow : MonoBehaviour, IUIWindow, IUIOverlayHost
|
||||
{
|
||||
[Header("Root UI")]
|
||||
[SerializeField] private CanvasGroup _canvasGroup;
|
||||
@@ -186,11 +186,8 @@ namespace BriarQueen.UI.Menus
|
||||
{
|
||||
StopAndResetCancellation();
|
||||
|
||||
_canvasGroup.blocksRaycasts = false;
|
||||
_canvasGroup.blocksRaycasts = true;
|
||||
_canvasGroup.interactable = false;
|
||||
|
||||
|
||||
TryUnregisterRaycaster();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -212,9 +209,46 @@ namespace BriarQueen.UI.Menus
|
||||
_canvasGroup.blocksRaycasts = false;
|
||||
_canvasGroup.interactable = false;
|
||||
|
||||
TryUnregisterRaycaster();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public async UniTask SuspendForOverlay()
|
||||
{
|
||||
StopAndResetCancellation();
|
||||
|
||||
_buttonsGroup.blocksRaycasts = false;
|
||||
_buttonsGroup.interactable = false;
|
||||
|
||||
try
|
||||
{
|
||||
await FadeGroup(_buttonsGroup, 0f, _buttonFadeSettings, _cts.Token);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public async UniTask ResumeFromOverlay()
|
||||
{
|
||||
StopAndResetCancellation();
|
||||
|
||||
_buttonsGroup.blocksRaycasts = true;
|
||||
_buttonsGroup.interactable = true;
|
||||
|
||||
try
|
||||
{
|
||||
await FadeGroup(_buttonsGroup, 1f, _buttonFadeSettings, _cts.Token);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SelectDefault();
|
||||
}
|
||||
|
||||
// ── DI ────────────────────────────────────────────────────────
|
||||
|
||||
[Inject]
|
||||
@@ -299,7 +333,7 @@ namespace BriarQueen.UI.Menus
|
||||
|
||||
private void OnSettingsClicked(UnderlineButton _)
|
||||
{
|
||||
_eventCoordinator?.Publish(new UIToggleSettingsWindow(true));
|
||||
_eventCoordinator?.Publish(new UIToggleSettingsWindow(true, SettingsOpenSource.PauseMenu));
|
||||
}
|
||||
|
||||
private void OnExitClicked(UnderlineButton _)
|
||||
@@ -430,4 +464,4 @@ namespace BriarQueen.UI.Menus
|
||||
_cts = new CancellationTokenSource();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user