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

Method addChildren

Engine/source/gui/controls/guiPopUpCtrlEx.cpp:1542–1569  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1540
1541//------------------------------------------------------------------------------
1542void GuiPopUpMenuCtrlEx::addChildren()
1543{
1544 mTl = new GuiPopupTextListCtrlEx( this );
1545 AssertFatal( mTl, "Failed to create the GuiPopUpTextListCtrlEx for the PopUpMenu" );
1546 // Use the children's profile rather than the parent's profile, if it exists.
1547 mTl->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
1548 mTl->setField("noDuplicates", "false");
1549
1550 mSc = new GuiScrollCtrl;
1551 AssertFatal( mSc, "Failed to create the GuiScrollCtrl for the PopUpMenu" );
1552 GuiControlProfile *prof;
1553 if ( Sim::findObject( "GuiScrollProfile", prof ) )
1554 {
1555 mSc->setControlProfile( prof );
1556 }
1557 else
1558 {
1559 // Use the children's profile rather than the parent's profile, if it exists.
1560 mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
1561 }
1562 mSc->setField( "hScrollBar", "AlwaysOff" );
1563 mSc->setField( "vScrollBar", "dynamic" );
1564 //if(mRenderScrollInNA) // Force the scroll control to render using fillColorNA rather than fillColor
1565 // mSc->mUseNABackground = true;
1566
1567 mBackground = new GuiPopUpBackgroundCtrlEx( this, mTl );
1568 AssertFatal( mBackground, "Failed to create the GuiBackgroundCtrlEx for the PopUpMenu" );
1569}
1570
1571//------------------------------------------------------------------------------
1572void GuiPopUpMenuCtrlEx::repositionPopup()

Callers

nothing calls this directly

Calls 4

setControlProfileMethod · 0.80
getChildrenProfileMethod · 0.80
setFieldMethod · 0.80
findObjectFunction · 0.50

Tested by

no test coverage detected