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

Method setControlProfile

Engine/source/gui/core/guiControl.cpp:1589–1628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1587//-----------------------------------------------------------------------------
1588
1589void GuiControl::setControlProfile( GuiControlProfile *prof )
1590{
1591 AssertFatal( prof, "GuiControl::setControlProfile: invalid profile" );
1592
1593 if ( prof == mProfile )
1594 return;
1595
1596 bool skipAwaken = false;
1597
1598 if ( mProfile == NULL )
1599 skipAwaken = true;
1600
1601 if( mProfile )
1602 mProfile->decUseCount();
1603
1604 if ( mAwake && mProfile )
1605 mProfile->decLoadCount();
1606
1607 // Clear the delete notification we previously set up
1608 if ( mProfile )
1609 clearNotify( mProfile );
1610
1611 mProfile = prof;
1612 mProfile->incUseCount();
1613 if ( mAwake )
1614 mProfile->incLoadCount();
1615
1616 // Make sure that the new profile will notify us when it is deleted
1617 if ( mProfile )
1618 deleteNotify( mProfile );
1619
1620 // force an update when the profile is changed
1621 if ( mAwake && !skipAwaken )
1622 {
1623 sleep();
1624
1625 if( !Sim::isShuttingDown() )
1626 awaken();
1627 }
1628}
1629
1630//-----------------------------------------------------------------------------
1631

Callers 12

constructEditControlMethod · 0.80
constructEditControlMethod · 0.80
constructEditControlMethod · 0.80
setMenuBarMethod · 0.80
setProfileProtMethod · 0.80
guiControl.cppFile · 0.80
showPopupMethod · 0.80
createContentMethod · 0.80
onAddMethod · 0.80
inspectGroupMethod · 0.80
addChildrenMethod · 0.80
addChildrenMethod · 0.80

Calls 5

isShuttingDownFunction · 0.85
decUseCountMethod · 0.80
decLoadCountMethod · 0.80
incUseCountMethod · 0.80
incLoadCountMethod · 0.80

Tested by

no test coverage detected