mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2026-04-19 14:52:43 +00:00
Added scroll control to sliders in radio
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class AMDemodulator : public Demodulator {
|
||||
public:
|
||||
@@ -139,7 +140,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel<float>(squelchLevel, 20, -100, 0)) {
|
||||
squelch.setLevel(squelchLevel);
|
||||
_config->aquire();
|
||||
_config->conf[uiPrefix]["AM"]["squelchLevel"] = squelchLevel;
|
||||
|
||||
Reference in New Issue
Block a user