1ere tentative IHM IA

This commit is contained in:
thomas committed 2026-09-05 09:18:47 +02:00
1 parent 44a43828f1
commit 83422c624a
35 files changed
+785 -106

No files matched your search

@@ -0,0 +1,42 @@
#include <gui/saturation_screen/SaturationView.hpp>
#include <audio_effects.h>
#include <touchgfx/Color.hpp>
#include <texts/TextKeysAndLanguages.hpp>
SaturationView::SaturationView()
{
}
void SaturationView::setupScreen()
{
SaturationViewBase::setupScreen();
}
void SaturationView::tearDownScreen()
{
SaturationViewBase::tearDownScreen();
}
void SaturationView::goBack()
{
application().gotoOverviewScreenBlockTransition();
}
void SaturationView::toggleEnabled()
{
bool en = !AudioEffects_GetParams()->saturation.enabled;
AudioEffects_GetParams()->saturation.enabled = en;
enableToggle.setLabelText(touchgfx::TypedText(en ? T_ON : T_OFF));
enableToggle.setLabelColor(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
enableToggle.setLabelColorPressed(en ? touchgfx::Color::getColorFromRGB(140, 190, 90) : touchgfx::Color::getColorFromRGB(200, 90, 70));
enableToggle.invalidate();
}
void SaturationView::param1Changed(int value)
{
AudioEffects_GetParams()->saturation.drive = value / 100.0f;
}
void SaturationView::param2Changed(int value)
{
AudioEffects_GetParams()->saturation.level = value / 100.0f;
}