Bsongis/issue 5311 (#5354)

Fixes #5311
This commit is contained in:
Bertrand Songis
2017-11-13 22:17:13 +01:00
committed by GitHub
parent e6542a78d0
commit e5b2b8ef64
12 changed files with 166 additions and 68 deletions
+3 -1
View File
@@ -20,12 +20,14 @@
#include "opentx.h"
void drawStringWithIndex(coord_t x, coord_t y, const char * str, int idx, LcdFlags flags, const char * prefix)
void drawStringWithIndex(coord_t x, coord_t y, const char * str, int idx, LcdFlags flags, const char * prefix, const char * suffix)
{
char s[64];
char * tmp = (prefix ? strAppend(s, prefix) : s);
tmp = strAppend(tmp, str);
tmp = strAppendUnsigned(tmp, abs(idx));
if (suffix)
strAppend(tmp, suffix);
lcdDrawText(x, y, s, flags);
}