Exemplo n.º 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;
        }
    }
Exemplo n.º 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();
    }
Exemplo n.º 3
0
 private void HandleWindowFocused(WindowsWindow window)
 {
     WindowFocused?.Invoke(window);
 }
Exemplo n.º 4
0
    public void CloseCurrentWindow()
    {
        GameObject window = WindowFocused.GetWindowObject();

        CloseWindow(window);
    }
Exemplo n.º 5
0
 public void CancelInputPressed(InputAction.CallbackContext ctx)
 {
     WindowFocused.OnCancelInputPressed();
 }