| 1991 | |
| 1992 | |
| 1993 | void ParameterKnobLookAndFeel::SliderLabel::updateText() |
| 1994 | { |
| 1995 | if (!enableTextSwitch) |
| 1996 | return; |
| 1997 | |
| 1998 | if (parent->isMouseOverOrDragging(true)) |
| 1999 | { |
| 2000 | auto value = parent->getValue(); |
| 2001 | auto p = dynamic_cast<ParameterSlider*>(parent.getComponent())->parameterToControl; |
| 2002 | |
| 2003 | if(p != nullptr && p->getValue() != value) |
| 2004 | { |
| 2005 | parent->setValue(p->getValue(), dontSendNotification); |
| 2006 | } |
| 2007 | |
| 2008 | if (!parent->isEnabled() && p != nullptr) |
| 2009 | value = p->getValue(); |
| 2010 | |
| 2011 | setText(parent->getTextFromValue(value), dontSendNotification); |
| 2012 | } |
| 2013 | else |
| 2014 | setText(parent->getName(), dontSendNotification); |
| 2015 | |
| 2016 | repaint(); |
| 2017 | } |
| 2018 | |
| 2019 | juce::Path ParameterSlider::ParameterIcons::createPath(const String& path) const |
| 2020 | { |
no test coverage detected