More compact views for inputs, mixers and outputs

This commit is contained in:
Raphael Coeffic
2022-08-28 13:07:03 +02:00
committed by Raphael Coeffic
parent cd211cba59
commit 731d1834e3
21 changed files with 632 additions and 308 deletions
+31
View File
@@ -416,3 +416,34 @@ int applyCurrentCurve(int x)
return applyCustomCurve(x, s_currIdxSubMenu);
}
#endif
#if defined(COLORLCD)
char *getCurveRefString(char *dest, size_t len, const CurveRef& curve)
{
if (!len) return dest;
char *s = dest;
if (curve.value != 0) {
switch (curve.type) {
case CURVE_REF_DIFF:
*(s++) = 'D'; if (--len == 0) return dest;
getValueOrGVarString(s, len, curve.value, -100, 100, 0, "%");
return dest;
case CURVE_REF_EXPO:
*(s++) = 'E'; if (--len == 0) return dest;
getValueOrGVarString(s, len, curve.value, -100, 100, 0, "%");
return dest;
case CURVE_REF_FUNC:
strAppend(dest, STR_VCURVEFUNC[curve.value], len);
return dest;
case CURVE_REF_CUSTOM:
return getCurveString(dest, curve.value);
}
}
return dest;
}
#endif