Hey, I'm building an SDL2 + Opengl 3.x GUI system that uses HTML. Something I'd like to do is create a library or a dll in order to make it easy for people to use my software without having to push all my .h and .cpp files into their code base.
https://github.com/pieisgood/SDL2-GUI
This is the code (there's lots of things I need to work on... memory management, using smart-pointers instead of the pointers I do use ect. )
I'm in the process of building out a subset of html elements and adding css for the box model and other styling considerations.
I'm working in VS2012, can any one teach me how to create this into a library? Also any other advice would be nice... but it is currently a bit hard to understand in the code.
For those that want to know how it should work:
The user of this system will create a GUIFactory.
Use the factory to create a GUIManager by handing the factory an HTML/XML file
Then pass SDL2 events to the GUIManager and call the managers draw function.
To change properties of elements, I will be making an interface similar to the javascript DOM ... where you select an element or set of elements by id and then change or add properties to them. This will allow people to use the system for slightly dynamic user interfaces (such as updating points for a game). In order to render a different page, you will need to create another manager with the factory and call its draw and event functions instead (any suggestions for improving this would be appreciated).
Thanks a lot in advance.