MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / drawBigButtonItem_

Method drawBigButtonItem_

source/MRViewer/MRRibbonMenu.cpp:1281–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1279}
1280
1281void RibbonMenu::drawBigButtonItem_( const MenuItemInfo& item )
1282{
1283 auto width = buttonDrawer_.calcItemWidth( item, DrawButtonParams::SizeType::Big );
1284
1285 auto availReg = ImGui::GetContentRegionAvail();
1286
1287 const auto& style = ImGui::GetStyle();
1288 ImVec2 itemSize = ImVec2( width.baseWidth, availReg.y - 2 * style.WindowPadding.y );
1289
1290 ImGui::SetCursorPosY( ImGui::GetCursorPosY() + availReg.y * 0.5f - itemSize.y * 0.5f );
1291
1292 buttonDrawer_.drawButtonItem( item, { DrawButtonParams::SizeType::Big,itemSize,cBigIconSize } );
1293}
1294
1295void RibbonMenu::drawSmallButtonsSet_( const std::vector<std::string>& group, int setFrontIndex, int setLength, bool withText )
1296{

Callers

nothing calls this directly

Calls 3

ImVec2Class · 0.85
calcItemWidthMethod · 0.80
drawButtonItemMethod · 0.80

Tested by

no test coverage detected