New UI continued

This commit is contained in:
Bertrand Songis
2019-10-05 19:01:57 +02:00
parent f5c60a86a9
commit ae548b9814
26 changed files with 331 additions and 196 deletions
+4 -4
View File
@@ -50,7 +50,7 @@ void runPopupCurvePreset(event_t event)
if (warningResult) {
warningResult = 0;
CurveInfo & crv = g_model.curves[s_curveChan];
CurveHeader & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
int k = 25 * reusableBuffer.curveEdit.preset;
int dx = 2000 / (5+crv.points-1);
@@ -71,13 +71,13 @@ void onCurveOneMenu(const char * result)
POPUP_INPUT(STR_PRESET, runPopupCurvePreset);
}
else if (result == STR_MIRROR) {
CurveInfo & crv = g_model.curves[s_curveChan];
CurveHeader & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
for (int i=0; i<5+crv.points; i++)
points[i] = -points[i];
}
else if (result == STR_CLEAR) {
CurveInfo & crv = g_model.curves[s_curveChan];
CurveHeader & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
for (int i=0; i<5+crv.points; i++)
points[i] = 0;
@@ -89,7 +89,7 @@ void onCurveOneMenu(const char * result)
void menuModelCurveOne(event_t event)
{
CurveData & crv = g_model.curves[s_curveChan];
CurveHeader & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
drawStringWithIndex(PSIZE(TR_MENUCURVES)*FW+FW, 0, STR_CV, s_curveChan+1);