| 449 | } |
| 450 | |
| 451 | void 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 |
| 466 | void DrawingProgram::selection_action_menu(Vector2f popupPos) { |
no test coverage detected