4343
4444#include " AudioEngine.h"
4545#include " ConfigManager.h"
46- #include " CustomTextKnob.h"
4746#include " Engine.h"
4847#include " FileDialog.h"
4948#include " GuiApplication.h"
5049#include " FontHelper.h"
5150#include " InstrumentPlayHandle.h"
5251#include " InstrumentTrack.h"
52+ #include " Knob.h"
5353#include " LocaleHelper.h"
5454#include " MainWindow.h"
5555#include " PathUtil.h"
6060#include " TextFloat.h"
6161#include " Clipboard.h"
6262
63-
6463#include " embed.h"
6564
6665namespace lmms
@@ -981,8 +980,13 @@ ManageVestigeInstrumentView::ManageVestigeInstrumentView( Instrument * _instrume
981980
982981 const auto & description = s_dumpValues.at (1 );
983982
984- auto knob = new CustomTextKnob (KnobType::Bright26, description.left (15 ), this , description);
983+ auto knob = new Knob (KnobType::Bright26, description.left (15 ), SMALL_FONT_SIZE , this , description);
985984 knob->setDescription (description + " :" );
985+ knob->setFloatingTextPushMode (10 );
986+ connect (knob, &Knob::floatingTextUpdateRequested, this , [i, this ]() {
987+ updateParameterText (i);
988+ }, Qt::DirectConnection);
989+
986990 m_vstKnobs.push_back (knob);
987991
988992 if ( !hasKnobModel )
@@ -1128,7 +1132,6 @@ void ManageVestigeInstrumentView::setParameter( Model * action )
11281132
11291133 if ( m_vi->m_plugin != nullptr ) {
11301134 m_vi->m_plugin ->setParam ( knobUNID, m_vi->knobFModel [knobUNID]->value () );
1131- syncParameterText ();
11321135 }
11331136}
11341137
@@ -1143,11 +1146,24 @@ void ManageVestigeInstrumentView::syncParameterText()
11431146
11441147 for (std::size_t i = 0 ; i < paramLabels.size (); ++i)
11451148 {
1146- m_vstKnobs[i]->setValueText (paramDisplays[i] + ' ' + paramLabels[i]);
1149+ m_vstKnobs[i]->pushFloatingText (paramDisplays[i] + ' ' + paramLabels[i]);
11471150 }
11481151}
11491152
11501153
1154+ void ManageVestigeInstrumentView::updateParameterText (int index)
1155+ {
1156+ m_vi->m_plugin ->updateParameterLabel (index);
1157+ m_vi->m_plugin ->updateParameterDisplay (index);
1158+
1159+ const auto & paramLabels = m_vi->m_plugin ->allParameterLabels ();
1160+ const auto & paramDisplays = m_vi->m_plugin ->allParameterDisplays ();
1161+ assert (paramLabels.size () == paramDisplays.size ());
1162+
1163+ m_vstKnobs.at (index)->pushFloatingText (paramDisplays[index] + ' ' + paramLabels[index]);
1164+ }
1165+
1166+
11511167
11521168void ManageVestigeInstrumentView::dragEnterEvent ( QDragEnterEvent * _dee )
11531169{
0 commit comments