Пример #1
0
    void Select(UICustomButton button)
    {
        if (!button.gameObject.activeSelf)
        {
            return;
        }

        if (_crtSelected != null)
        {
            _crtSelected.OnDiselect();
        }
        _crtSelected = button;
        _crtSelected.OnSelect();
    }
Пример #2
0
    public virtual void ForceStart()
    {
        var allCustomButtons = GetComponentsInChildren <UICustomButton>(true);

        confirmButton = allCustomButtons.FirstOrDefault(x => x.ButtonType == CustomButtonTypeEnum.Confirm);

        if (confirmButton == null)
        {
            Debug.LogError("Could not find Confirm Button on Dialog: " + gameObject.name);
        }
        else
        {
            confirmButton.Button.onClick.AddListener(OnConfirmClick);
        }
    }