Updated to ImGui 1.87 to cleanup UI code

This commit is contained in:
AlexandreRouma
2022-02-14 23:33:52 +01:00
parent 04e54a2d57
commit 51c940acd4
47 changed files with 2018 additions and 1069 deletions

View File

@ -7,7 +7,6 @@
#include <gui/main_window.h>
#include <signal_path/signal_path.h>
#include <gui/style.h>
#include <keybinds.h>
namespace displaymenu {
bool showWaterfall;
@ -89,8 +88,8 @@ namespace displaymenu {
}
void draw(void* ctx) {
float menuWidth = ImGui::GetContentRegionAvailWidth();
bool homePressed = ImGui::IsKeyPressed(KB_KEY_HOME, false);
float menuWidth = ImGui::GetContentRegionAvail().x;
bool homePressed = ImGui::IsKeyPressed(ImGuiKey_Home, false);
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || homePressed) {
if (homePressed) { showWaterfall = !showWaterfall; }
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();