Added VFO coloring option

This commit is contained in:
Ryzerth
2021-05-04 20:41:23 +02:00
parent 9a1850bd61
commit 1eca58605c
10 changed files with 200 additions and 10 deletions

View File

@ -194,7 +194,7 @@ namespace ImGui {
if (IS_IN_AREA(mPos, wfMin, wfMax)) {
for (auto const& [name, vfo] : vfos) {
window->DrawList->AddRectFilled(vfo->wfRectMin, vfo->wfRectMax, IM_COL32(255, 255, 255, 50));
window->DrawList->AddRectFilled(vfo->wfRectMin, vfo->wfRectMax, vfo->color);
window->DrawList->AddLine(vfo->wfLineMin, vfo->wfLineMax, (name == selectedVFO) ? IM_COL32(255, 0, 0, 255) : IM_COL32(255, 255, 0, 255));
}
}
@ -1115,7 +1115,7 @@ namespace ImGui {
}
void WaterfallVFO::draw(ImGuiWindow* window, bool selected) {
window->DrawList->AddRectFilled(rectMin, rectMax, IM_COL32(255, 255, 255, 50));
window->DrawList->AddRectFilled(rectMin, rectMax, color);
if (lineVisible) {
window->DrawList->AddLine(lineMin, lineMax, selected ? IM_COL32(255, 0, 0, 255) : IM_COL32(255, 255, 0, 255));
}
@ -1128,7 +1128,7 @@ namespace ImGui {
if (reference != REF_UPPER && !bandwidthLocked) {
if (IS_IN_AREA(mousePos, rbwSelMin, rbwSelMax)) { ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); }
else if (IS_IN_AREA(mousePos, wfRbwSelMin, wfRbwSelMax)) { ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); }
}
}
};
void WaterFall::showWaterfall() {

View File

@ -61,6 +61,8 @@ namespace ImGui {
double minBandwidth;
double maxBandwidth;
bool bandwidthLocked;
ImU32 color = IM_COL32(255, 255, 255, 50);
};
class WaterFall {