- int titleLeft = (getWidth() - title.length() - 2) / 2;
- getScreen().putCharXY(titleLeft, 0, ' ', titleColor);
- getScreen().putStringXY(titleLeft + 1, 0, title, titleColor);
- getScreen().putCharXY(titleLeft + title.length() + 1, 0, ' ',
+ // This particular title is always single-width (see format string
+ // above), but for completeness let's treat it the same as every
+ // other window title string.
+ int titleLeft = (getWidth() - StringUtils.width(title) - 2) / 2;
+ putCharXY(titleLeft, 0, ' ', titleColor);
+ putStringXY(titleLeft + 1, 0, title, titleColor);
+ putCharXY(titleLeft + StringUtils.width(title) + 1, 0, ' ',