MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setVisible

Method setVisible

Engine/source/gui/core/guiControl.cpp:1757–1784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755//-----------------------------------------------------------------------------
1756
1757void GuiControl::setVisible(bool value)
1758{
1759 mVisible = value;
1760
1761 setUpdate();
1762
1763 for( iterator i = begin(); i != end(); i++)
1764 {
1765 GuiControl *ctrl = static_cast<GuiControl *>(*i);
1766 ctrl->clearFirstResponder();
1767 }
1768
1769 GuiControl *parent = getParent();
1770 if( parent )
1771 {
1772 parent->childResized( this );
1773
1774 // If parent is visible and awake and this control has just
1775 // become visible but was sleeping, wake it up now.
1776
1777 if( parent->isVisible() && parent->isAwake()
1778 && this->isVisible() && !this->isAwake() )
1779 awaken();
1780 }
1781
1782 if( getNamespace() ) // May be called during construction.
1783 onVisible_callback( value );
1784}
1785
1786//-----------------------------------------------------------------------------
1787

Callers 5

MainWindowMethod · 0.45
ea_startMethod · 0.45
ea_finishMethod · 0.45
_setVisibleFunction · 0.45
guiControl.cppFile · 0.45

Calls 5

beginFunction · 0.85
endFunction · 0.85
clearFirstResponderMethod · 0.80
childResizedMethod · 0.45
isVisibleMethod · 0.45

Tested by

no test coverage detected