| 595 | #endif |
| 596 | |
| 597 | void do_show_scope_window(ScopeData* gScope, const float uiScale) |
| 598 | { |
| 599 | // Data is updated live, so let's take local copies of critical stuff. |
| 600 | int index = gScope->mIndex; |
| 601 | |
| 602 | ImGui::Begin("Scope", nullptr, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize); |
| 603 | |
| 604 | ImGui::BeginChild("Channel options", ImVec2((4 * 25)*uiScale, (2 * 152 + 32) * uiScale)); |
| 605 | ImGui::Checkbox("###ea", &gScope->mCh[0].mEnabled); ImGui::SameLine(); |
| 606 | ImGui::Checkbox("###eb", &gScope->mCh[1].mEnabled); ImGui::SameLine(); |
| 607 | ImGui::Checkbox("###ec", &gScope->mCh[2].mEnabled); ImGui::SameLine(); |
| 608 | ImGui::Checkbox("###ed", &gScope->mCh[3].mEnabled); |
| 609 | |
| 610 | ImGui::PushStyleColor(ImGuiCol_SliderGrab, gScope->colors[0]); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, gScope->colors[0]); |
| 611 | if (ImGui::VSliderInt("###0a", ImVec2(19 * uiScale, 150 * uiScale), &gScope->mCh[0].mScaleSlider, -4, 4, "")) |
| 612 | { |
| 613 | gScope->mCh[0].mScale = scalesteps[gScope->mCh[0].mScaleSlider + 4]; |
| 614 | } |
| 615 | if (ImGui::IsItemHovered()) |
| 616 | { |
| 617 | ImGui::BeginTooltip(); |
| 618 | ImGui::Text("%s", scaletexts[gScope->mCh[0].mScaleSlider + 4]); |
| 619 | ImGui::EndTooltip(); |
| 620 | } |
| 621 | ImGui::PopStyleColor(2); ImGui::SameLine(); |
| 622 | ImGui::PushStyleColor(ImGuiCol_SliderGrab, gScope->colors[1]); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, gScope->colors[1]); |
| 623 | if (ImGui::VSliderInt("###1a", ImVec2(19 * uiScale, 150 * uiScale), &gScope->mCh[1].mScaleSlider, -4, 4, "")) |
| 624 | { |
| 625 | gScope->mCh[1].mScale = scalesteps[gScope->mCh[1].mScaleSlider + 4]; |
| 626 | } |
| 627 | if (ImGui::IsItemHovered()) |
| 628 | { |
| 629 | ImGui::BeginTooltip(); |
| 630 | ImGui::Text("%s", scaletexts[gScope->mCh[1].mScaleSlider + 4]); |
| 631 | ImGui::EndTooltip(); |
| 632 | } |
| 633 | ImGui::PopStyleColor(2); ImGui::SameLine(); |
| 634 | ImGui::PushStyleColor(ImGuiCol_SliderGrab, gScope->colors[2]); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, gScope->colors[2]); |
| 635 | if (ImGui::VSliderInt("###2a", ImVec2(19 * uiScale, 150 * uiScale), &gScope->mCh[2].mScaleSlider, -4, 4, "")) |
| 636 | { |
| 637 | gScope->mCh[2].mScale = scalesteps[gScope->mCh[2].mScaleSlider + 4]; |
| 638 | } |
| 639 | if (ImGui::IsItemHovered()) |
| 640 | { |
| 641 | ImGui::BeginTooltip(); |
| 642 | ImGui::Text("%s", scaletexts[gScope->mCh[2].mScaleSlider + 4]); |
| 643 | ImGui::EndTooltip(); |
| 644 | } |
| 645 | ImGui::PopStyleColor(2); ImGui::SameLine(); |
| 646 | ImGui::PushStyleColor(ImGuiCol_SliderGrab, gScope->colors[3]); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, gScope->colors[3]); |
| 647 | if (ImGui::VSliderInt("###3a", ImVec2(19 * uiScale, 150 * uiScale), &gScope->mCh[3].mScaleSlider, -4, 4, "")) |
| 648 | { |
| 649 | gScope->mCh[3].mScale = scalesteps[gScope->mCh[3].mScaleSlider + 4]; |
| 650 | } |
| 651 | if (ImGui::IsItemHovered()) |
| 652 | { |
| 653 | ImGui::BeginTooltip(); |
| 654 | ImGui::Text("%s", scaletexts[gScope->mCh[3].mScaleSlider + 4]); |
no test coverage detected