MCPcopy Create free account
hub / github.com/TankOs/SFGUI / SetActive

Method SetActive

src/SFGUI/RadioButton.cpp:39–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void RadioButton::SetActive( bool active ) {
40 if( active && m_group ) {
41 for( auto iter = m_group->GetMembers().begin(); iter != m_group->GetMembers().end(); ++iter ) {
42 std::shared_ptr<RadioButton> radio_button( iter->lock() );
43
44 if( radio_button ) {
45 radio_button->SetActive( false );
46 }
47 else {
48 m_group->GetMembers().erase( iter );
49 }
50 }
51 }
52
53 ToggleButton::SetActive( active );
54}
55
56void RadioButton::HandleMouseClick( sf::Mouse::Button button, int x, int y ) {
57 if( !IsActive() && ( button == sf::Mouse::Button::Left ) ) {

Callers 2

mainFunction · 0.45
RunMethod · 0.45

Calls 1

endMethod · 0.80

Tested by 1

RunMethod · 0.36