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

Method getMinExtent

Engine/source/gui/controls/guiGameListMenuCtrl.cpp:542–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542Point2I GuiGameListMenuCtrl::getMinExtent() const
543{
544 Point2I parentMin = Parent::getMinExtent();
545
546 GuiGameListMenuProfile * profile = dynamic_cast<GuiGameListMenuProfile*>(mProfile);
547 AssertFatal(profile, "Invalid profile for GuiGameListMenuCtrl!");
548
549 S32 minHeight = 0;
550 S32 rowHeight = profile->getRowHeight();
551
552 for (Vector<Row *>::const_iterator row = mRows.begin(); row < mRows.end(); ++row)
553 {
554 minHeight += rowHeight;
555 if (row != mRows.begin())
556 {
557 minHeight += (*row)->mHeightPad;
558 }
559 }
560
561 if (minHeight > parentMin.y)
562 parentMin.y = minHeight;
563
564 return parentMin;
565}
566
567bool GuiGameListMenuCtrl::onAdd()
568{

Callers

nothing calls this directly

Calls 4

getMinExtentFunction · 0.85
getRowHeightMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected