mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-26 14:29:31 +00:00
remove error api
This commit is contained in:
parent
bbfc553e29
commit
7d69cbd34e
@ -56,30 +56,6 @@ void TFTDisplay::clear() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void TFTDisplay::error(char *s) {
|
||||
setColor(_fg);
|
||||
char *lines[5];
|
||||
int l = 0;
|
||||
for (char *p = s, *q = s; *p; p++)
|
||||
if (*p == '\n') {
|
||||
*p++ = 0;
|
||||
lines[l++] = q;
|
||||
q = p;
|
||||
}
|
||||
unsigned y = (_dy - l*_cy)/2;
|
||||
for (int i = 0; i < l; i++) {
|
||||
char *p = lines[i];
|
||||
#if defined(USE_UTFT)
|
||||
unsigned x = (_dx - strlen(p)*_cx)/2;
|
||||
utft.print(p, x, y);
|
||||
#elif defined(USE_ESPI)
|
||||
unsigned x = (_dx - espi.textWidth(p))/2;
|
||||
espi.drawCentreString(p, x, y, 0);
|
||||
#endif
|
||||
y += _cy;
|
||||
}
|
||||
}
|
||||
|
||||
void TFTDisplay::status(const char *s) {
|
||||
setColor(_fg);
|
||||
|
||||
|
@ -31,7 +31,6 @@ class TFTDisplay {
|
||||
public:
|
||||
void begin(colour_t bg, colour_t fg, orientation_t o = landscape);
|
||||
void clear();
|
||||
void error(char *);
|
||||
void status(const char *);
|
||||
|
||||
void drawPixel(unsigned x, unsigned y, colour_t col);
|
||||
|
Loading…
Reference in New Issue
Block a user