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

Method setControlProfile

Engine/source/gui/core/guiControl.cpp:1574–1613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1572//-----------------------------------------------------------------------------
1573
1574void GuiControl::setControlProfile( GuiControlProfile *prof )
1575{
1576 AssertFatal( prof, "GuiControl::setControlProfile: invalid profile" );
1577
1578 if ( prof == mProfile )
1579 return;
1580
1581 bool skipAwaken = false;
1582
1583 if ( mProfile == NULL )
1584 skipAwaken = true;
1585
1586 if( mProfile )
1587 mProfile->decUseCount();
1588
1589 if ( mAwake && mProfile )
1590 mProfile->decLoadCount();
1591
1592 // Clear the delete notification we previously set up
1593 if ( mProfile )
1594 clearNotify( mProfile );
1595
1596 mProfile = prof;
1597 mProfile->incUseCount();
1598 if ( mAwake )
1599 mProfile->incLoadCount();
1600
1601 // Make sure that the new profile will notify us when it is deleted
1602 if ( mProfile )
1603 deleteNotify( mProfile );
1604
1605 // force an update when the profile is changed
1606 if ( mAwake && !skipAwaken )
1607 {
1608 sleep();
1609
1610 if( !Sim::isShuttingDown() )
1611 awaken();
1612 }
1613}
1614
1615//-----------------------------------------------------------------------------
1616

Callers 10

showPopupMethod · 0.80
setProfileProtMethod · 0.80
guiControl.cppFile · 0.80
onActionMethod · 0.80
onSubmenuActionMethod · 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