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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Simonge

Pages: [1]
1
SFML projects / Re: Qt 5 & SFML 2 integration with events
« on: July 26, 2015, 11:39:07 pm »
And why don't you just use Qt events directly?

I wanted to have the ability to try out a level inside of the editor. If I were to use Qt events directly, I would have to implement input logic twice as the game itself doesn't use Qt. Basically, I have a "Play" button inside of the editor that allows me to jump in and check things out without having to "run" the game.

2
SFML projects / Qt 5 & SFML 2 integration with events
« on: July 26, 2015, 09:15:01 pm »
Hello everyone.

I was working on a level editor, as such I decided to use Qt for native widgets and dialogs.
Unfortunately, SFML-specific events don't work out of the box in Qt 5.

I rolled a hacky solution that translates Qt events into SFML events. Left/right control, shift, system and alt buttons are currently undifferentiated as Qt sees them as one button, but everything else seems to work well.

This is based on the Qt + SFML 1.6 tutorial and this article, I simply got rid of multiple inheritance, added signals instead of forcing the user to inherit from Canvas and added code that translates events.

https://bitbucket.org/Simonge/qsf

Pages: [1]