Пример #1
0
    public static int _bind_removeEventListener(Lua.lua_State L)
    {
        if (Lua.lua_gettop(L) != 3 ||
            Luna.get_uniqueid(L, 1) != 8952431 ||
            Lua.lua_isstring(L, 2) == 0 ||
            Lua.lua_isnumber(L, 3) == 0)
        {
            Luna.printStack(L); Lua.luaL_error(L, "luna typecheck failed:removeEventListener(LWF.Button self)");
        }

        LWF.Button self      = Luna_LWF_Button.check(L, 1);
        string     eventName = Lua.lua_tostring(L, 2).ToString();
        int        id        = (int)Lua.lua_tonumber(L, 3);

        try {
            self.RemoveEventHandler(eventName, id);
        } catch (Exception e) { Lua.luaL_error(L, new Lua.CharPtr(e.ToString())); }
        return(0);
    }