Original Post
I am trying to develop a Lua based GUI library on top of OpenGL. What I want to do is be able to write xml files that define the appearance layout of the GUI, with attributes that contain lua code to excute onClick, rollover, etc. It is feasible to use Lua+XML for this purpose? I want to do almost all of the logic in Lua, and only do the drawing of the gui elements in lua. For example, I could define how to draw gradients, images, boxes, borders, etc. In c++, and then use lua to implement buttons, sliders, menus, etc, by reusing those base components. The idea is that I can define a Menu in lua, create one in the XML file, and then have the C++ xml parser call lua code when it runs into the Menu component that it doesn't understand. A even better idea is to even do the XML parsing in Lua, leaving the drawing code in C++. The goal is to make as much as the system in Lua as possible, allowing me to port the GUI system to the Wii. The only parts I want to code in C++ are the system dependent parts, like init, texture loading, drawing, input, sound, etc. Is this a feasible idea? Can Lua do this? Are there any common problems I will have trying to implement a OO system in Lua? Should I use a C++ bind tool like luabind for this? Or is it best to code that myself? Any ideas guys?