aboutsummaryrefslogtreecommitdiff
path: root/gui/newgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r--gui/newgui.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 5f03cc0db2..a167fd9382 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -363,11 +363,7 @@ void NewGui::drawChar(byte chr, int xx, int yy, OverlayColor color) {
}
int NewGui::getStringWidth(const String &str) {
- int space = 0;
-
- for (uint i = 0; i < str.size(); ++i)
- space += getCharWidth(str[i]);
- return space;
+ return g_guifont.getStringWidth(str);
}
int NewGui::getCharWidth(byte c) {