Fixed scroll bug and added keybinds

This commit is contained in:
Ryzerth
2021-04-24 04:06:04 +02:00
parent dd5490cac6
commit a35d0252e7
5 changed files with 69 additions and 43 deletions

View File

@ -74,7 +74,8 @@ namespace displaymenu {
void draw(void* ctx) {
float menuWidth = ImGui::GetContentRegionAvailWidth();
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall)) {
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) {
if (ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) { showWaterfall = !showWaterfall; }
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
core::configManager.aquire();
core::configManager.conf["showWaterfall"] = showWaterfall;