Example #1
0
    public virtual void SetButtonGroup(UButtonGroup newGroup, bool setMemberValue)
    {
        UButtonGroup oldGroup = m_Group;

        if (m_Group != null)
        {
            m_Group.UnregisterButton(this);
        }

        if (setMemberValue)
        {
            m_Group = newGroup;
        }

        if (m_Group != null && IsActive())
        {
            m_Group.RegisterButton(this);
        }

        if (newGroup != null && newGroup != oldGroup && Selected)// && IsActive())
        {
            m_Group.NotifyItemOn(this);
        }
    }