| 74 | }; |
| 75 | |
| 76 | bool new_times(auto name, auto labelh, auto labelm, Time &t) { |
| 77 | auto [width, height] = im::GetIO().DisplaySize; |
| 78 | im::PushItemWidth(im::GetWindowWidth() * 0.2f); |
| 79 | FZ_SCOPEGUARD([] { im::PopItemWidth(); }); |
| 80 | |
| 81 | bool ret = false; |
| 82 | im::TextUnformatted(name); |
| 83 | im::SameLine(); im::SetCursorPosX(0.08f * width); |
| 84 | int int_h = t.h, int_m = t.m; |
| 85 | ret |= im::DragInt(labelh, &int_h, 0.05f, 0, 23, "%02dh"); |
| 86 | ret |= swkbd::handle(labelh, &int_h, 0, 23); |
| 87 | im::SameLine(); |
| 88 | ret |= im::DragInt(labelm, &int_m, 0.05f, 0, 59, "%02dm"); |
| 89 | ret |= swkbd::handle(labelm, &int_m, 0, 59); |
| 90 | t.h = static_cast<std::uint8_t>(int_h), t.m = static_cast<std::uint8_t>(int_m); |
| 91 | |
| 92 | return ret; |
| 93 | }; |
| 94 | |
| 95 | bool new_range(auto name, auto labelcb, auto labello, auto labelhi, ColorRange &range) { |
| 96 | auto [width, height] = im::GetIO().DisplaySize; |
no test coverage detected