From 6afe247bc3f37f220795a72d90fe165e8f00d26f Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 3 Mar 2017 08:55:35 +0100 Subject: [PATCH] - luainstance: add missing RADIUS_NONE; fix typo in dynfont handling --- src/gui/lua/luainstance.cpp | 5 +++-- src/gui/lua/luainstance.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 8df8c00ec..2b8a2ac76 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -270,6 +270,7 @@ static void set_lua_variables(lua_State *L) { "RADIUS_MID", RADIUS_MID }, { "RADIUS_SMALL", RADIUS_SMALL }, { "RADIUS_MIN", RADIUS_MIN }, + { "RADIUS_NONE", RADIUS_NONE }, { NULL, 0 } }; @@ -343,7 +344,7 @@ static void set_lua_variables(lua_State *L) { "STYLE_ITALIC", (lua_Integer)CNeutrinoFonts::FONT_STYLE_ITALIC }, { "MAX", (lua_Integer)CNeutrinoFonts::DYNFONTEXT_MAX }, { "MAXIMUM_FONTS", (lua_Integer)CLuaInstance::DYNFONT_MAXIMUM_FONTS }, - { "TO_WIDE", (lua_Integer)CLuaInstance::DYNFONT_TO_WIDE }, + { "TOO_WIDE", (lua_Integer)CLuaInstance::DYNFONT_TOO_WIDE }, { "TOO_HIGH", (lua_Integer)CLuaInstance::DYNFONT_TOO_HIGH }, { NULL, 0 } }; @@ -1050,7 +1051,7 @@ int CLuaInstance::getDynFont(lua_State *L) dx = luaL_checkint(L, 2); if (dx > (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth(true)) { lua_pushnil(L); - lua_pushinteger(L, DYNFONT_TO_WIDE); + lua_pushinteger(L, DYNFONT_TOO_WIDE); return 2; } dy = luaL_checkint(L, 3); diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 21ebb625b..fe0ad3bff 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -46,7 +46,7 @@ public: enum { DYNFONT_NO_ERROR = 0, DYNFONT_MAXIMUM_FONTS = 1, - DYNFONT_TO_WIDE = 2, + DYNFONT_TOO_WIDE = 2, DYNFONT_TOO_HIGH = 3 };