| 23 | } |
| 24 | |
| 25 | void RadioButton::SetGroup( RadioButtonGroup::Ptr group ) { |
| 26 | auto weak_this = std::weak_ptr<RadioButton>( std::static_pointer_cast<RadioButton>( shared_from_this() ) ); |
| 27 | |
| 28 | if( m_group ) { |
| 29 | m_group->GetMembers().erase( weak_this ); |
| 30 | } |
| 31 | |
| 32 | m_group = group; |
| 33 | |
| 34 | if( m_group ) { |
| 35 | m_group->GetMembers().insert( weak_this ); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void RadioButton::SetActive( bool active ) { |
| 40 | if( active && m_group ) { |