mirror of
https://github.com/edubart/otclient.git
synced 2025-10-21 23:05:54 +02:00
add command completion to console
This commit is contained in:
@@ -108,6 +108,7 @@ void LuaInterface::registerFunctions()
|
||||
g_lua.bindClassMemberFunction<UILineEdit>("getText", &UILineEdit::getText);
|
||||
g_lua.bindClassMemberFunction<UILineEdit>("setText", &UILineEdit::setText);
|
||||
g_lua.bindClassMemberFunction<UILineEdit>("clearText", &UILineEdit::clearText);
|
||||
g_lua.bindClassMemberFunction<UILineEdit>("getCursorPos", &UILineEdit::getCursorPos);
|
||||
|
||||
// UIWindow
|
||||
g_lua.registerClass<UIWindow, UIWidget>();
|
||||
|
@@ -92,7 +92,7 @@ void push_luavalue(const std::string& str)
|
||||
bool luavalue_cast(int index, std::string& str)
|
||||
{
|
||||
str = g_lua.toString(index);
|
||||
if(str.empty() && !g_lua.isString(index))
|
||||
if(str.empty() && g_lua.isString(index) && !g_lua.isNil())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user