mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
APVTS: Improved the default string displayed for parameter values
This commit is contained in:
parent
7063d9a7a4
commit
d3cada1bc5
1 changed files with 4 additions and 3 deletions
|
|
@ -68,10 +68,11 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete
|
|||
: text.getFloatValue());
|
||||
}
|
||||
|
||||
String getText (float v, int length) const override
|
||||
String getText (float normalisedValue, int length) const override
|
||||
{
|
||||
return valueToTextFunction != nullptr ? valueToTextFunction (range.convertFrom0to1 (v))
|
||||
: AudioProcessorParameter::getText (v, length);
|
||||
auto value = range.convertFrom0to1 (normalisedValue);
|
||||
return valueToTextFunction != nullptr ? valueToTextFunction (value)
|
||||
: AudioProcessorParameter::getText (value, length);
|
||||
}
|
||||
|
||||
int getNumSteps() const override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue