Added more keyboard controls

This commit is contained in:
Ryzerth
2021-04-23 17:53:25 +02:00
parent b8e4a79188
commit d43f501819
2 changed files with 27 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <gui/widgets/frequency_select.h>
#include <config.h>
#include <gui/style.h>
#include <GLFW/glfw3.h>
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
@ -150,6 +151,12 @@ void FrequencySelect::draw() {
}
frequencyChanged = true;
}
if (ImGui::IsKeyPressed(GLFW_KEY_UP)) {
incrementDigit(i);
}
if (ImGui::IsKeyPressed(GLFW_KEY_DOWN)) {
decrementDigit(i);
}
if (mw != 0) {
int count = abs(mw);
for (int j = 0; j < count; j++) {