- change getRenderWidth() default to UTF8

This commit is contained in:
svenhoefer
2014-06-11 11:48:59 +02:00
parent bec2e87412
commit 8b91cda918
35 changed files with 127 additions and 128 deletions

View File

@@ -608,7 +608,7 @@ int CLuaInstance::RenderString(lua_State *L)
center = luaL_checkint(L, 9);
if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0)
f = SNeutrinoSettings::FONT_TYPE_MENU;
int rwidth = g_Font[f]->getRenderWidth(text, true);
int rwidth = g_Font[f]->getRenderWidth(text);
if (center) { /* center the text inside the box */
if (rwidth < w)
x += (w - rwidth) / 2;
@@ -635,7 +635,7 @@ int CLuaInstance::getRenderWidth(lua_State *L)
if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0)
f = SNeutrinoSettings::FONT_TYPE_MENU;
lua_pushinteger(L, (int)g_Font[f]->getRenderWidth(text, true));
lua_pushinteger(L, (int)g_Font[f]->getRenderWidth(text));
return 1;
}