diff options
Diffstat (limited to 'plugins/MirLua/src/m_msg_buttonsbar.cpp')
-rw-r--r-- | plugins/MirLua/src/m_msg_buttonsbar.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/plugins/MirLua/src/m_msg_buttonsbar.cpp b/plugins/MirLua/src/m_msg_buttonsbar.cpp index a5007f7d46..4082fa0ba0 100644 --- a/plugins/MirLua/src/m_msg_buttonsbar.cpp +++ b/plugins/MirLua/src/m_msg_buttonsbar.cpp @@ -212,7 +212,7 @@ static luaL_Reg msgbuttinsbarApi[] = { NULL, NULL }
};
-#define MT_CUSTOMBUTTONCLICKDATA "CustomButtonClickData"
+/*#define MT_CUSTOMBUTTONCLICKDATA "CustomButtonClickData"
static int bcd__init(lua_State *L)
{
@@ -252,18 +252,25 @@ static int bcd__index(lua_State *L) static luaL_Reg bcdMeta[] =
{
- { "__init", bcd__init },
+ { MT_CUSTOMBUTTONCLICKDATA, bcd__init },
{ "__index", bcd__index },
{ NULL, NULL }
-};
+};*/
LUAMOD_API int luaopen_m_msg_buttonsbar(lua_State *L)
{
luaL_newlib(L, msgbuttinsbarApi);
-
- luaL_newmetatable(L, MT_CUSTOMBUTTONCLICKDATA);
- luaL_setfuncs(L, bcdMeta, 0);
+
+ MT<CustomButtonClickData>(L, "CustomButtonClickData")
+ .Field(&CustomButtonClickData::pszModule, "Module")
+ .Field(&CustomButtonClickData::dwButtonId, "ButtonID")
+ .Field(&CustomButtonClickData::hContact, "hContact")
+ .Field(&CustomButtonClickData::flags, "Flags");
lua_pop(L, 1);
+ /*luaL_newmetatable(L, MT_CUSTOMBUTTONCLICKDATA);
+ luaL_setfuncs(L, bcdMeta, 0);
+ lua_pop(L, 1);*/
+
return 1;
}
|