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

Method SetActive

src/SFGUI/ToggleButton.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void ToggleButton::SetActive( bool active ) {
36 if( active == m_active ) {
37 return;
38 }
39
40 m_active = active;
41
42 if( active ) {
43 SetState( State::SELECTED );
44 }
45 else {
46 SetState( State::NORMAL );
47 }
48
49 Invalidate();
50 GetSignals().Emit( OnToggle );
51}
52
53bool ToggleButton::IsActive() const {
54 return m_active;

Callers

nothing calls this directly

Calls 1

EmitMethod · 0.80

Tested by

no test coverage detected