Esempio n. 1
0
        public void Init(FriendUI friend, FriendButtonsUI userButtons, FriendStatusLineUI statusLine, FriendActionsButton actionsButton)
        {
            Friend        = friend;
            UserButtons   = userButtons;
            ActionsButton = actionsButton;
            StatusLine    = statusLine;

            if (StatusLine != null)
            {
                StatusLine.ClearMessage();
            }

            if (UserButtons != null)
            {
                UserButtons.DisableAll();
                InitUserButtons(UserButtons);
            }

            if (ActionsButton != null)
            {
                ActionsButton.gameObject.SetActive(true);
                ActionsButton.ClearActions();
                InitUserActionsButton(ActionsButton);
            }

            InitOtherElements();
        }
Esempio n. 2
0
        private void OnDestroy()
        {
            ClearActions();

            if (_activeButton != null && _activeButton.Equals(this))
            {
                _activeButton = null;
            }
        }
Esempio n. 3
0
        private void ToggleActionContainer()
        {
            var newActiveValue = !IsActive;

            actionContainer.gameObject.SetActive(newActiveValue);

            if (!_activeButton)
            {
                _activeButton = this;
                return;
            }

            if (_activeButton.Equals(this))
            {
                return;
            }

            if (_activeButton.IsActive)
            {
                _activeButton.ToggleActionContainer();
            }

            _activeButton = this;
        }
Esempio n. 4
0
 protected abstract void InitUserActionsButton(FriendActionsButton actionsButton);