MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / popup_menu_action_button

Method popup_menu_action_button

src/DrawingProgram/DrawingProgram.cpp:451–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451void DrawingProgram::popup_menu_action_button(const char* id, const char* text, const std::function<void()>& onClick) {
452 GUIStuff::GUIManager& gui = world.main.g.gui;
453
454 GUIStuff::ElementHelpers::text_button(gui, id, text, {
455 .drawType = GUIStuff::SelectableButton::DrawType::TRANSPARENT_ALL,
456 .wide = true,
457 .centered = false,
458 .onClick = [&, onClick] {
459 onClick();
460 clear_right_click_popup();
461 }
462 });
463}
464
465// Should only be used in selection allowing tools
466void DrawingProgram::selection_action_menu(Vector2f popupPos) {

Callers 1

right_click_popup_guiMethod · 0.80

Calls 1

text_buttonFunction · 0.85

Tested by

no test coverage detected