1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

FIXEDWIDTH flag

Editing fields are now in FIXED mode to show its real width on LCD.
TODO: font bitmaps have to be altered to center shorter characters to the center of the field.
This commit is contained in:
mhotar 2014-01-05 10:56:17 +01:00
parent b90a621db8
commit 32c16f9f28
4 changed files with 17 additions and 6 deletions

View file

@ -287,7 +287,10 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
}
}
else if (i <= 5) b = pgm_read_byte(q++);
if (b == 0xff) continue;
if (b == 0xff) {
if (flags & FIXEDWIDTH) b = 0;
else continue;
}
if (inv) b = ~b;
#if !defined(CPUM64) || defined(EXTSTD)
if (!(flags & BOLD) && (i == 7)) continue;
@ -459,6 +462,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
{
uint8_t fw = FWNUM;
int8_t mode = MODE(flags);
flags &= ~LEADING0;
bool dblsize = flags & DBLSIZE;
#if defined(CPUARM)
bool midsize = flags & MIDSIZE;
@ -490,6 +494,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
len = mode + 1;
}
if (dblsize) {
fw += FWNUM;
}
@ -933,7 +938,7 @@ void putsVBat(xcoord_t x, uint8_t y, LcdFlags att)
void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags att)
{
lcd_putsAtt(x, y, str, att);
lcd_putsAtt(x, y, str, att & ~LEADING0);
lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2);
}