Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Creating a library? SDL2 GUI system


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Pieisgood   Members   -  Reputation: 202

Like
0Likes
Like

Posted 24 July 2014 - 11:55 AM

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.



Sponsor:

#2 superman3275   Crossbones+   -  Reputation: 2061

Like
1Likes
Like

Posted 29 July 2014 - 08:11 AM

Google is your friend.


I'm a game programmer and computer science ninja ph34r.png!

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

 

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here smile.png!





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS