GLK: Fix placement of input cursor

This commit is contained in:
Paul Gilbert
2018-12-08 19:05:59 -08:00
committed by Paul Gilbert
parent e9c7b30246
commit 012d4bafbb
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -119,13 +119,13 @@ int Fonts::drawStringUni(const Point &pos, int fontIdx, const byte *rgb, const C
size_t Fonts::stringWidth(int fontIdx, const Common::String &text, int spw) {
// TODO: Handle spw
Graphics::Font *font = _fontTable[fontIdx];
return font->getStringWidth(text);
return font->getStringWidth(text) * GLI_SUBPIX;
}
size_t Fonts::stringWidthUni(int fontIdx, const Common::U32String &text, int spw) {
// TODO: Handle spw
Graphics::Font *font = _fontTable[fontIdx];
return font->getStringWidth(text);
return font->getStringWidth(text) * GLI_SUBPIX;
}
} // End of namespace Gargoyle
+2
View File
@@ -84,6 +84,7 @@ public:
* @param fontIdx Which font to use
* @param text Text to get the width of
* @param spw ???
* @returns Width of string multiplied by GLI_SUBPIX
*/
size_t stringWidth(int fontIdx, const Common::String &text, int spw = -1);
@@ -92,6 +93,7 @@ public:
* @param fontIdx Which font to use
* @param text Text to get the width of
* @param spw ???
* @returns Width of string multiplied by GLI_SUBPIX
*/
size_t stringWidthUni(int fontIdx, const Common::U32String &text, int spw = -1);
};