mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2026-04-19 06:42:43 +00:00
Updated to ImGui 1.87 to cleanup UI code
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <gui/gui.h>
|
||||
#include <gui/style.h>
|
||||
#include <keybinds.h>
|
||||
|
||||
float DEFAULT_COLOR_MAP[][3] = {
|
||||
{ 0x00, 0x00, 0x20 },
|
||||
@@ -390,8 +389,8 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
// If the left and right keys are pressed while hovering the freq scale, move it too
|
||||
bool leftKeyPressed = ImGui::IsKeyPressed(KB_KEY_LEFT);
|
||||
if ((leftKeyPressed || ImGui::IsKeyPressed(KB_KEY_RIGHT)) && mouseInFreq) {
|
||||
bool leftKeyPressed = ImGui::IsKeyPressed(ImGuiKey_LeftArrow);
|
||||
if ((leftKeyPressed || ImGui::IsKeyPressed(ImGuiKey_RightArrow)) && mouseInFreq) {
|
||||
viewOffset += leftKeyPressed ? (viewBandwidth / 20.0) : (-viewBandwidth / 20.0);
|
||||
|
||||
if (viewOffset + (viewBandwidth / 2.0) > wholeBandwidth / 2.0) {
|
||||
@@ -438,7 +437,7 @@ namespace ImGui {
|
||||
|
||||
ImGui::TextUnformatted(name.c_str());
|
||||
|
||||
if (ImGui::IsKeyDown(KB_KEY_LCTRL) || ImGui::IsKeyDown(KB_KEY_RCTRL)) {
|
||||
if (ImGui::GetIO().KeyCtrl) {
|
||||
ImGui::Separator();
|
||||
printAndScale(_vfo->generalOffset + centerFreq, buf);
|
||||
ImGui::Text("Frequency: %sHz", buf);
|
||||
@@ -464,7 +463,7 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
// Handle Page Up to cycle through VFOs
|
||||
if (ImGui::IsKeyPressed(KB_KEY_PG_UP) && selVfo != NULL) {
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_PageUp) && selVfo != NULL) {
|
||||
std::string next = (--vfos.end())->first;
|
||||
std::string lowest = "";
|
||||
double lowestOffset = INFINITY;
|
||||
@@ -487,7 +486,7 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
// Handle Page Down to cycle through VFOs
|
||||
if (ImGui::IsKeyPressed(KB_KEY_PG_DOWN) && selVfo != NULL) {
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_PageDown) && selVfo != NULL) {
|
||||
std::string next = (--vfos.end())->first;
|
||||
std::string highest = "";
|
||||
double highestOffset = -INFINITY;
|
||||
|
||||
Reference in New Issue
Block a user