Moved menus to their own respective files

This commit is contained in:
Ryzerth
2020-09-25 14:25:36 +02:00
parent 5fedda08d7
commit 2c4d7cbf09
16 changed files with 346 additions and 238 deletions

View 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();
}
}