Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Combining SFML with another GUI library  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

s3rius

  • Newbie
  • *
  • Posts: 21
    • View Profile
Combining SFML with another GUI library
« on: February 13, 2011, 07:30:52 pm »
Hello there,

I'm now at a point in time where I'd like to start working on a Game Editor in order to create all the custom resources (Terrain maps, animation sequences, image formats, etc) that my game uses.

Since I've already created all necessary Load/Save functions I'd like to stick with C++ for creating the editor (I initially wanted to use C# and use C++ managed code, but I've only heard bad things about that).
I'd also like to keep using SFML to make a preview for animations, sounds, images, etc.

I've delved into the WinAPI and MFC for creating GUI applications, but it seems rather archaic and more complicated than necessary.
Libraries like QT or wxWidgets look much more elegant.

Now, my question is if it is possible to make both applications draw onto the same window in order to use both at once.
Or, alternatively, what would you think would be the best way to create such an editor?

Other ideas I've had:
#1: Remake the Save/Load functions entirely and use a seperate SFML application to act as a preview window.
#2: It should be possible, at least with the WinAPI, to "hack" into an SFML window and hijack it to add dialog controls. I'm not sure whether SFML will like that, however..
#3: Reinvent the wheel and code the entire GUI in SFMl. Uhh..

Edit: Nevermiiiind. I've never seen the tut for that.. Thanks Laurent.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Combining SFML with another GUI library
« Reply #1 on: February 13, 2011, 07:36:15 pm »
It's very easy to embed a SFML view into a Qt or wxWidget user interface, this is the typical way to write game editors.
There are tutorials and examples that demonstrate how to do this.
Laurent Gomila - SFML developer