fix popup item menu and refactor ui system

This commit is contained in:
Vova
2023-12-11 16:16:18 +02:00
parent bf088009f6
commit e7f082a774
14 changed files with 131 additions and 63 deletions
+7 -7
View File
@@ -42,22 +42,22 @@ public class RadialMenuItem : MonoBehaviour
{
b.onClick.AddListener(() =>
{
CloseDialog();
Hide();
Close();
_menuButtonClick?.Invoke(_actions.ElementAt(buttonNumber).Key);
});
}
private void CloseDialog()
public void CancelAndClose()
{
UIManager.Instance.Unfreeze();
Destroy(_popupMenu);
Destroy(this);
Close();
_menuButtonClick?.Invoke(RadialMenuActions.Cancel);
}
private void Hide()
private void Close()
{
GameManager.Instance.UI.Unfreeze();
Destroy(this);
gameObject.SetActive(false);
Destroy(gameObject);
}