Jump to content

A C++/LUA bridge Class

Roland

2,285 views

I have made a small class for helping with reading and writing parameters between C++ and LUA and also calling LUA functions from C++. I'm sharing this little thing here.

 

blogentry-395-0-01293300-1488719654_thumb.png

 

Using the class is quite simple as shown below

 

LUA - part

blogentry-395-0-18534700-1488720057.png

 

C++ - part

blogentry-395-0-59572000-1488719924_thumb.png

 

I have included is a test project which looks like this in the editor

blogentry-395-0-25132300-1488720141_thumb.png

 

And like this when executed

blogentry-395-0-63899000-1488720151_thumb.png

 

Here is the LuaBridge class source

LuaBrigde.h

LuaBrigde.cpp

 

And the complete test project

LuaBridge.zip

 

Note: Its says 'Click for next test', should be 'Hit Spacebar for next test'

  • Like 5


2 Comments


Recommended Comments

Nice Roland. Would be a nice addition for Leadwerks 5 imo. I think C++ could gain some popularity if there is a uniform way for communicating between the editor's lua properties and C++.

  • Like 2

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   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.

×
×
  • Create New...