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

Method tool_options_gui

src/DrawingProgram/DrawingProgram.cpp:535–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535void 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
559void DrawingProgram::modify_grid(const NetworkingObjects::NetObjWeakPtr<WorldGrid>& gridToModify) {
560 std::unique_ptr<GridModifyTool> newTool(std::make_unique<GridModifyTool>(*this));

Callers 1

drawing_program_guiMethod · 0.80

Calls 2

get_typeMethod · 0.45
gui_toolboxMethod · 0.45

Tested by

no test coverage detected