mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
set text width ahead of width calculation
This commit is contained in:
parent
1bc94c2ec3
commit
42ef297241
1 changed files with 1 additions and 1 deletions
|
|
@ -163,9 +163,9 @@ void UITask::renderCurrScreen() {
|
||||||
|
|
||||||
char tmp[80];
|
char tmp[80];
|
||||||
if (_alert[0]) {
|
if (_alert[0]) {
|
||||||
|
_display->setTextSize(1.4);
|
||||||
uint16_t textWidth = _display->getTextWidth(_alert);
|
uint16_t textWidth = _display->getTextWidth(_alert);
|
||||||
_display->setCursor((_display->width() - textWidth) / 2, 22);
|
_display->setCursor((_display->width() - textWidth) / 2, 22);
|
||||||
_display->setTextSize(1.4);
|
|
||||||
_display->setColor(DisplayDriver::GREEN);
|
_display->setColor(DisplayDriver::GREEN);
|
||||||
_display->print(_alert);
|
_display->print(_alert);
|
||||||
_alert[0] = 0;
|
_alert[0] = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue