clockfont_mono_070

This commit is contained in:
e2002
2023-03-13 17:59:55 +03:00
parent f7d50daa00
commit 81e900c03c
29 changed files with 882 additions and 39 deletions

View File

@@ -85,7 +85,13 @@ void DspCore::_clockSeconds(){
setTextColor(config.theme.seconds, config.theme.background);
setCursor(width() - 8 - clockRightSpace - CHARWIDTH*3*2, clockTop-clockTimeHeight+1);
sprintf(_bufforseconds, "%02d", network.timeinfo.tm_sec);
print(_bufforseconds); /* print seconds */
print(_bufforseconds);
setTextSize(1);
setFont(&DS_DIGI42pt7b);
setTextColor((network.timeinfo.tm_sec % 2 == 0) ? config.theme.clock : (CLOCKFONT_MONO?config.theme.clockbg:config.theme.background), config.theme.background);
setCursor(_timeleft+_dotsLeft, clockTop);
print(":"); /* print dots */
setFont(); /* print seconds */
}
void DspCore::_clockDate(){
@@ -104,10 +110,16 @@ void DspCore::_clockDate(){
}
void DspCore::_clockTime(){
if(_oldtimeleft>0) dsp.fillRect(_oldtimeleft, clockTop-clockTimeHeight+1, _oldtimewidth, clockTimeHeight, config.theme.background);
if(_oldtimeleft>0 && !CLOCKFONT_MONO) dsp.fillRect(_oldtimeleft, clockTop-clockTimeHeight+1, _oldtimewidth, clockTimeHeight, config.theme.background);
_timeleft = width()-clockRightSpace-CHARWIDTH*3*2-24-_timewidth;
setTextSize(1);
setFont(&DS_DIGI42pt7b);
if(CLOCKFONT_MONO) {
setCursor(_timeleft, clockTop);
setTextColor(config.theme.clockbg, config.theme.background);
print("88:88");
}
setTextColor(config.theme.clock, config.theme.background);
setCursor(_timeleft, clockTop);
print(_timeBuf);