mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-09 18:45:22 +02:00
Moved menus to their own respective files
This commit is contained in:
23
core/src/gui/menus/display.cpp
Normal file
23
core/src/gui/menus/display.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <gui/menus/display.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/gui.h>
|
||||
#include <core.h>
|
||||
|
||||
namespace displaymenu {
|
||||
bool showWaterfall;
|
||||
|
||||
void init() {
|
||||
showWaterfall = core::configManager.conf["showWaterfall"];
|
||||
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
|
||||
}
|
||||
|
||||
void draw(void* ctx) {
|
||||
if (ImGui::Checkbox("Show Waterfall", &showWaterfall)) {
|
||||
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
|
||||
core::configManager.aquire();
|
||||
core::configManager.conf["showWaterfall"] = showWaterfall;
|
||||
core::configManager.release(true);
|
||||
}
|
||||
ImGui::Spacing();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user