Cleaned up UI code

This commit is contained in:
Ryzerth
2021-06-20 21:17:11 +02:00
parent 1e71a52727
commit 94fae2135d
16 changed files with 273 additions and 228 deletions

View File

@ -68,7 +68,7 @@ namespace displaymenu {
break;
}
}
setFFTSize(FFTSizes[fftSizeId]);
gui::mainWindow.setFFTSize(FFTSizes[fftSizeId]);
}
@ -100,7 +100,7 @@ namespace displaymenu {
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##test_fft_size", &fftSizeId, FFTSizesStr)) {
setFFTSize(FFTSizes[fftSizeId]);
gui::mainWindow.setFFTSize(FFTSizes[fftSizeId]);
core::configManager.aquire();
core::configManager.conf["fftSize"] = FFTSizes[fftSizeId];
core::configManager.release(true);

View File

@ -37,7 +37,7 @@ namespace sourecmenu {
}
float itemWidth = ImGui::GetContentRegionAvailWidth();
if (sdrIsRunning()) { style::beginDisabled(); }
if (gui::mainWindow.sdrIsRunning()) { style::beginDisabled(); }
ImGui::SetNextItemWidth(itemWidth);
if (ImGui::Combo("##source", &sourceId, items.c_str())) {
@ -47,7 +47,7 @@ namespace sourecmenu {
core::configManager.release(true);
}
if (sdrIsRunning()) { style::endDisabled(); }
if (gui::mainWindow.sdrIsRunning()) { style::endDisabled(); }
sigpath::sourceManager.showSelectedMenu();