- lua: fix hintbox/messagebox default width

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-10-16 23:57:28 +02:00
committed by Thilo Graf
parent 4ad2f33830
commit 3739e712d4
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ int CLuaInstHintbox::HintboxNew(lua_State *L)
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
tableLookup(L, "text", text);
tableLookup(L, "icon", icon);
lua_Integer width = 450;
lua_Integer width = HINTBOX_MIN_WIDTH;
tableLookup(L, "width", width);
CLuaHintbox **udata = (CLuaHintbox **) lua_newuserdata(L, sizeof(CLuaHintbox *));

View File

@@ -66,7 +66,7 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L)
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
tableLookup(L, "text", text);
tableLookup(L, "icon", icon);
lua_Integer timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = 0, default_button = 0;
lua_Integer timeout = -1, width = MSGBOX_MIN_WIDTH, return_default_on_timeout = 0, show_buttons = 0, default_button = 0;
tableLookup(L, "timeout", timeout);
tableLookup(L, "width", width);
tableLookup(L, "return_default_on_timeout", return_default_on_timeout);