using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace GUI_Scripts { public class SettingsButton:MonoBehaviour { public GameObject Panel; public void manageWindow() { if(!InventoryUIManager.Instance.GetPanelStatus() && !EquipmentUIManager.Instance.GetPanelStatus()) this.OpenPlayerPanel(); else this.ClosePlayerPanel(); } public void OpenPlayerPanel() { if(!InventoryUIManager.Instance.GetPanelStatus() || !EquipmentUIManager.Instance.GetPanelStatus()) { InventoryUIManager.Instance.OpenPanel(); EquipmentUIManager.Instance.OpenPanel(); } } public void ClosePlayerPanel() { if(InventoryUIManager.Instance.GetPanelStatus() || EquipmentUIManager.Instance.GetPanelStatus()) { InventoryUIManager.Instance.ClosePanel(); EquipmentUIManager.Instance.ClosePanel(); } } public void OpenAssociatedPanel() { if (Panel != null) { if (Panel.active == false) { //bool isActive = Panel.activeSelf; Panel.SetActive(true); } else { Panel.SetActive(false); } } } public void CloseAssociatedPanel() { if (Panel != null) { Panel.SetActive(false); } } [SerializeField] private CanvasGroup keybindMenu; } }