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

Method drawHelpButton_

source/MRViewer/MRRibbonMenu.cpp:374–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374void RibbonMenu::drawHelpButton_( const std::string& url )
375{
376 float btnSize = UI::scale() * cTopPanelAditionalButtonSize;
377
378 ImGui::PushStyleVar( ImGuiStyleVar_FrameRounding, cHeaderQuickAccessFrameRounding * UI::scale() );
379 ImGui::PushStyleVar( ImGuiStyleVar_FrameBorderSize, 0.0f );
380 ImGui::PushStyleColor( ImGuiCol_Button, ImVec4( 0, 0, 0, 0 ) );
381 ImGui::PushStyleColor( ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4( ImGuiCol_ScrollbarGrabHovered ) );
382 ImGui::PushStyleColor( ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4( ImGuiCol_ScrollbarGrabActive ) );
383
384 ImGui::PushStyleColor( ImGuiCol_Text, ColorTheme::getRibbonColor( ColorTheme::RibbonColorsType::TabText ).getUInt32() );
385 RibbonFontHolder font( RibbonFontManager::FontType::Icons, 0.7f );
386 if ( ImGui::Button( "\xef\x81\x99", ImVec2( btnSize, btnSize ) ) )
387 OpenLink( url );
388 font.popFont();
389 ImGui::PopStyleColor();
390 UI::setTooltipIfHovered( _tr( "Open help page" ) );
391
392 ImGui::PopStyleColor( 3 );
393 ImGui::PopStyleVar( 2 );
394}
395
396void RibbonMenu::drawLanguageButton_()
397{

Callers

nothing calls this directly

Calls 7

ImVec4Class · 0.85
ImVec2Class · 0.85
OpenLinkFunction · 0.85
setTooltipIfHoveredFunction · 0.85
getUInt32Method · 0.80
popFontMethod · 0.80
scaleFunction · 0.70

Tested by

no test coverage detected