From 9bdc5e2cb6b50ef4406e823a0b49c717b2212ef5 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 9 Nov 2021 09:32:33 -0500 Subject: [PATCH] Update BefacoBigKnob from Pyer. Remove BefacoBigSnapKnob. --- include/componentlibrary.hpp | 10 +- res/ComponentLibrary/BefacoBigKnob-bg.svg | 21 +++ res/ComponentLibrary/BefacoBigKnob.svg | 210 +++++++++++++--------- 3 files changed, 155 insertions(+), 86 deletions(-) create mode 100644 res/ComponentLibrary/BefacoBigKnob-bg.svg diff --git a/include/componentlibrary.hpp b/include/componentlibrary.hpp index 4c612cba..74ce6e5e 100644 --- a/include/componentlibrary.hpp +++ b/include/componentlibrary.hpp @@ -643,16 +643,16 @@ struct Trimpot : app::SvgKnob { }; struct BefacoBigKnob : app::SvgKnob { + widget::SvgWidget* bg; + BefacoBigKnob() { minAngle = -0.75 * M_PI; maxAngle = 0.75 * M_PI; setSvg(Svg::load(asset::system("res/ComponentLibrary/BefacoBigKnob.svg"))); - } -}; -struct BefacoBigSnapKnob : BefacoBigKnob { - BefacoBigSnapKnob() { - snap = true; + bg = new widget::SvgWidget; + fb->addChildBelow(bg, tw); + bg->setSvg(Svg::load(asset::system("res/ComponentLibrary/BefacoBigKnob-bg.svg"))); } }; diff --git a/res/ComponentLibrary/BefacoBigKnob-bg.svg b/res/ComponentLibrary/BefacoBigKnob-bg.svg new file mode 100644 index 00000000..de7a73aa --- /dev/null +++ b/res/ComponentLibrary/BefacoBigKnob-bg.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/BefacoBigKnob.svg b/res/ComponentLibrary/BefacoBigKnob.svg index 912ba00b..e45a6d88 100644 --- a/res/ComponentLibrary/BefacoBigKnob.svg +++ b/res/ComponentLibrary/BefacoBigKnob.svg @@ -1,81 +1,129 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +