| 443 | } |
| 444 | |
| 445 | void PhoneDrawingProgramScreen::top_toolbar() { |
| 446 | auto& gui = main.g.gui; |
| 447 | auto& io = gui.io; |
| 448 | |
| 449 | gui.element<LayoutElement>("top toolbar", [&](LayoutElement*, const Clay_ElementId& lId) { |
| 450 | CLAY(lId, {}) { |
| 451 | window_fill_side_bar(gui, { |
| 452 | .dir = WindowFillSideBarConfig::Direction::TOP, |
| 453 | .backgroundColor = io.theme->backColor0, |
| 454 | .border = { |
| 455 | .color = convert_vec4<Clay_Color>(io.theme->frontColor1), |
| 456 | .width = {.bottom = 1} |
| 457 | } |
| 458 | }, [&] { |
| 459 | CLAY_AUTO_ID({ |
| 460 | .layout = { |
| 461 | .sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) }, |
| 462 | .childAlignment = { .x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_CENTER}, |
| 463 | .layoutDirection = CLAY_LEFT_TO_RIGHT |
| 464 | } |
| 465 | }) { |
| 466 | svg_icon_button(gui, "back exit button", "data/icons/RemixIcon/arrow-left-s-line.svg", { |
| 467 | .drawType = SelectableButton::DrawType::TRANSPARENT_ALL, |
| 468 | .onClick = [&] { |
| 469 | save_to_file(); |
| 470 | main.set_tab_to_close(main.world.get()); |
| 471 | } |
| 472 | }); |
| 473 | global_log(); |
| 474 | if(!(main.world->netClient && main.world->clientStillConnecting)) { |
| 475 | top_toolbar_remaining_area(); |
| 476 | top_toolbar_settings_popup(); |
| 477 | } |
| 478 | } |
| 479 | }); |
| 480 | } |
| 481 | }); |
| 482 | } |
| 483 | |
| 484 | void PhoneDrawingProgramScreen::top_toolbar_remaining_area() { |
| 485 | auto& gui = main.g.gui; |
nothing calls this directly
no test coverage detected