| 533 | } |
| 534 | |
| 535 | void DrawingProgram::tool_options_gui(Toolbar& t) { |
| 536 | using namespace GUIStuff; |
| 537 | |
| 538 | GUIStuff::GUIManager& gui = world.main.g.gui; |
| 539 | auto& io = gui.io; |
| 540 | |
| 541 | float minGUIWidth = drawTool->get_type() == DrawingProgramToolType::SCREENSHOT ? 300 : 200; |
| 542 | gui.element<LayoutElement>("Drawing program tool options gui", [&] (LayoutElement*, const Clay_ElementId& lId) { |
| 543 | CLAY(lId, { |
| 544 | .layout = { |
| 545 | .sizing = {.width = CLAY_SIZING_FIT(minGUIWidth), .height = CLAY_SIZING_FIT(0)}, |
| 546 | .padding = CLAY_PADDING_ALL(io.theme->padding1), |
| 547 | .childGap = io.theme->childGap1, |
| 548 | .childAlignment = { .x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_TOP}, |
| 549 | .layoutDirection = CLAY_TOP_TO_BOTTOM |
| 550 | }, |
| 551 | .backgroundColor = convert_vec4<Clay_Color>(io.theme->backColor1), |
| 552 | .cornerRadius = CLAY_CORNER_RADIUS(io.theme->windowCorners1) |
| 553 | }) { |
| 554 | drawTool->gui_toolbox(t); |
| 555 | } |
| 556 | }); |
| 557 | } |
| 558 | |
| 559 | void DrawingProgram::modify_grid(const NetworkingObjects::NetObjWeakPtr<WorldGrid>& gridToModify) { |
| 560 | std::unique_ptr<GridModifyTool> newTool(std::make_unique<GridModifyTool>(*this)); |
no test coverage detected