Example #1
0
    private void OnPopupClose(PopupEvents.ClosePopupEvent e)
    {
        if (View == null)
        {
            InstantiateView();
        }

        View.GetComponent <PopupView>().ClosePopup();
    }
Example #2
0
    protected virtual void OnPopupClose(PopupEvents.ClosePopupEvent e)
    {
        if (View == null)
        {
            return;
        }

        View.GetComponent <PopupView>().ClosePopup();
    }
    protected override void OnPopupClose(PopupEvents.ClosePopupEvent e)
    {
        if (_gridModel.SelectedUnit != null)
        {
            _gridModel.SelectedUnit.Selected = false;
            _gridModel.SelectedUnit          = null;
        }

        View.GetComponent <PopupView>().ClosePopup();
    }
    private void Start()
    {
        var e = new PopupEvents.ClosePopupEvent();

        CloseButton.onClick.AddListener(delegate {
            EventSystem.instance.Dispatch(e);
        });
        BgCloseButton.onClick.AddListener(delegate
        {
            EventSystem.instance.Dispatch(e);
        });
    }
Example #5
0
    protected void Start()
    {
        var e = new PopupEvents.ClosePopupEvent();

        if (CloseButton != null)
        {
            CloseButton.onClick.AddListener(delegate {
                EventSystem.instance.Dispatch(e);
            });
        }
        BgCloseButton.onClick.AddListener(delegate
        {
            EventSystem.instance.Dispatch(e);
        });
    }