Jump to content

In Lua full params EmitEvent is not bind?


Dreikblack
 Share

Recommended Posts

This is the binding code. I can see from looking at it what the issue is. With sol, nil does not automatically map to shared pointers, so separate overloads have to be added to handle that.

		L->set_function("EmitEvent", sol::overload(
			[](const Event& e) { return EmitEvent(e); },
			[](const int id, shared_ptr<Object> source) { return EmitEvent(id, source); },
			[](const int id) { return EmitEvent(id); },
			[](const int id, shared_ptr<Object> source) { return EmitEvent(id, source); },
			[](const int id, shared_ptr<Object> source, const int data) { return LuaEmitEvent(id, source, data,0,0,0,0,nullptr,""); },
			[](const int id, shared_ptr<Object> source, const int data, const int x, const int y) { return LuaEmitEvent(id, source, data, x, y, 0, 0, nullptr, L""); },
			[](const int id, shared_ptr<Object> source, const int data, const int x, const int y, const int w, const int h) { return LuaEmitEvent(id, source, data, x, y, w, h, nullptr, L""); },
			[](const int id, shared_ptr<Object> source, const int data, const int x, const int y, const int w, const int h, shared_ptr<Object> o) { return LuaEmitEvent(id, source, data, x, y, w, h, o, L""); },
			[](const int id, shared_ptr<Object> source, const int data, const int x, const int y, const int w, const int h, shared_ptr<Object> o, std::string s) { return LuaEmitEvent(id, source, data, x, y, w, h, o, s); }
		));

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...