MCPcopy Create free account
hub / github.com/christophhart/HISE / updateText

Method updateText

hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp:1993–2017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1991
1992
1993void 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
2019juce::Path ParameterSlider::ParameterIcons::createPath(const String& path) const
2020{

Callers 5

ParameterSliderMethod · 0.45
timerCallbackMethod · 0.45
mouseEnterMethod · 0.45
mouseExitMethod · 0.45
sliderValueChangedMethod · 0.45

Calls 8

isMouseOverOrDraggingMethod · 0.80
getNameMethod · 0.65
repaintFunction · 0.50
getValueMethod · 0.45
getComponentMethod · 0.45
setValueMethod · 0.45
isEnabledMethod · 0.45
getTextFromValueMethod · 0.45

Tested by

no test coverage detected