rainmeter-studio/Library/lua/glue/LuaGlobal.cpp
Birunthan Mohanathas b99b275f44 Script:
- Added support for calling Lua functions with !PluginBang
- Removed old (undocumented) implementation for handling mouse actions
- Lua errors now contain the script file name only (instead of full path)
2011-07-07 16:18:39 +00:00

24 lines
479 B
C++

#include "../../StdAfx.h"
#include "../LuaManager.h"
#include "../../Litestep.h"
static int Global_Log(lua_State* L)
{
const char* str = tolua_tostring(L, 1, 0);
LuaManager::LuaLog(LOG_NOTICE, str);
return 0;
}
static const luaL_reg TO_funcs[] =
{
{ "LuaLog", Global_Log },
{ NULL, NULL }
};
void LuaManager::RegisterGlobal(lua_State* L)
{
lua_register(L, "print", Global_Log);
luaL_register(L, "TO", TO_funcs); // For backwards compatibility
}