SFML community forums
Help => Window => Topic started by: slotdev on August 10, 2012, 01:16:32 pm
-
Hi
Is there an SFML way to bring a window to the top/front/whatever?
We have a bug where a menu launches the game, but still has focus - so when you click anywhere in the game window, you see a bit of what the menu had last (in this case, a black screen) - this lasts a frame or two, and then the game has focus.
I guess I can use Windows API's SetForegroundWindow(myWindowHandle) - but would prefer not to ;)
Thanks
Ed
-
I'm not quite sure if you're problem is really that the window isn't infront, because your description sounds more like you don't clear the screen in the beginning and thus the graphic memory could still filled with the menu thus showing it in your window.
Or have I understood you wrong?
Also is your menu within your SFML application or is that something external?
Could you ellaborate more (e.g. with images)?