Exemple #1
0
    public void Update()
    {
        if (!MenuPresence)
        {
            return;
        }

        if (WindowFocused != null)
        {
            if (CurrentSelection == null)
            {
                WindowFocused.SetDefaultItemSelected();
            }

            if (m_PrevSelection != CurrentSelection)
            {
                onSelectionChangeEvent?.Invoke(CurrentSelection);
            }

            m_PrevSelection = CurrentSelection;
        }
    }
Exemple #2
0
    public void NewFocusedWindow(GameObject windowObj, bool stack = false, bool persistantWindow = false)
    {
        IUIWindows window = windowObj.GetComponent <IUIWindows>();

        if (window == null)
        {
            return;
        }

        if (stack)
        {
            WindowSelectable WS;

            WS.Window         = WindowFocused;
            WS.ObjectSelected = CurrentSelection;

            m_WindowStack.Push(WS);
        }

        ToggleWindowInteractable(WindowFocused?.GetWindowObject(), false);
        WindowFocused = window;
        ToggleWindowInteractable(windowObj, true);
        window.SetDefaultItemSelected();
    }
Exemple #3
0
 private void HandleWindowFocused(WindowsWindow window)
 {
     WindowFocused?.Invoke(window);
 }
Exemple #4
0
    public void CloseCurrentWindow()
    {
        GameObject window = WindowFocused.GetWindowObject();

        CloseWindow(window);
    }
Exemple #5
0
 public void CancelInputPressed(InputAction.CallbackContext ctx)
 {
     WindowFocused.OnCancelInputPressed();
 }