aboutsummaryrefslogtreecommitdiff
path: root/src/sysbin/lx/lxdrawlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysbin/lx/lxdrawlib.c')
-rw-r--r--src/sysbin/lx/lxdrawlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sysbin/lx/lxdrawlib.c b/src/sysbin/lx/lxdrawlib.c
index 22c6a3b..1a24fcb 100644
--- a/src/sysbin/lx/lxdrawlib.c
+++ b/src/sysbin/lx/lxdrawlib.c
@@ -90,16 +90,18 @@ static int font_gc(lua_State *L) {
static int font_text_width(lua_State *L) {
drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT);
const char* txt = luaL_checkstring(L, 2);
+ int size = luaL_checkinteger(L, 3);
- lua_pushinteger(L, g_text_width(f->font, txt));
+ lua_pushinteger(L, g_text_width(f->font, txt, size));
return 1;
}
static int font_text_height(lua_State *L) {
drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT);
const char* txt = luaL_checkstring(L, 2);
+ int size = luaL_checkinteger(L, 3);
- lua_pushinteger(L, g_text_height(f->font, txt));
+ lua_pushinteger(L, g_text_height(f->font, txt, size));
return 1;
}