public void Update() { if (!MenuPresence) { return; } if (WindowFocused != null) { if (CurrentSelection == null) { WindowFocused.SetDefaultItemSelected(); } if (m_PrevSelection != CurrentSelection) { onSelectionChangeEvent?.Invoke(CurrentSelection); } m_PrevSelection = CurrentSelection; } }
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(); }
private void HandleWindowFocused(WindowsWindow window) { WindowFocused?.Invoke(window); }
public void CloseCurrentWindow() { GameObject window = WindowFocused.GetWindowObject(); CloseWindow(window); }
public void CancelInputPressed(InputAction.CallbackContext ctx) { WindowFocused.OnCancelInputPressed(); }