mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-25 02:18:30 +01:00
Added scroll control to sliders in radio
This commit is contained in:
parent
9def1843b2
commit
49ec3d68d2
@ -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;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class CWDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -147,7 +148,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_cw_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]["CW"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class DSBDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -139,7 +140,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_dsb_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]["DSB"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class FMDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -135,7 +136,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_fm_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]["FM"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class LSBDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -139,7 +140,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_lsb_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]["LSB"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class RAWDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -102,7 +103,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_raw_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]["RAW"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class USBDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -139,7 +140,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_usb_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]["USB"]["squelchLevel"] = squelchLevel;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <config.h>
|
||||
#include <imgui.h>
|
||||
#include <gui/widgets/scroll_behavior.h>
|
||||
|
||||
class WFMDemodulator : public Demodulator {
|
||||
public:
|
||||
@ -159,7 +160,7 @@ public:
|
||||
ImGui::Text("Squelch");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
|
||||
if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel<float>(squelchLevel, 20, -100, 0)) {
|
||||
squelch.setLevel(squelchLevel);
|
||||
_config->aquire();
|
||||
_config->conf[uiPrefix]["WFM"]["squelchLevel"] = squelchLevel;
|
||||
|
Loading…
Reference in New Issue
Block a user