SFML community forums

Help => Window => Topic started by: Submerged on January 25, 2013, 04:26:58 pm

Title: Dynamic window resize events (i.e., before mouse is released)
Post by: Submerged on January 25, 2013, 04:26:58 pm
I apologize if this has been posted, but after scouring the forums, I couldn't find a solution.

If I create a RenderWindow and decide to resize it, it only resizes after the mouse is released. I understand this is a result of the main thread blocking while this is happening, but is there no way around it? I am trying to make a UI Toolkit (buttons, scroll bars, tabs..etc) and no modern day application would have this behaviour. Here is my small call to the resize event which are only printed out when the mouse is released.

 if(Event.Type == sf::Event::Resized)
                cout << "RESIZE";

Here's a screenshot of a small graphics test with some ugly resize artifacts all the way down as I attempt to make the screen larger.
Thanks everyone :) I appreciate your comments
(http://i.imgur.com/NrULl5z.png)
Title: Re: Dynamic window resize events (i.e., before mouse is released)
Post by: eXpl0it3r on January 25, 2013, 04:46:31 pm
No SFML doesn't support this.

Keep in mind that SFML isn't the best library for GUI applications, it targets more things that go towards games and other multimedia intense applications...
But you're of course free to change the source code to your needs. ;)
Title: Re: Dynamic window resize events (i.e., before mouse is released)
Post by: Submerged on January 25, 2013, 04:57:03 pm
Thanks eXpl0it3r :) I figured as much. I appreciate the response!
Title: Re: Dynamic window resize events (i.e., before mouse is released)
Post by: Hiura on January 25, 2013, 05:14:45 pm
Yeah, we don't support that.. But if someone find a solution I'm always listening !
Title: Re: Dynamic window resize events (i.e., before mouse is released)
Post by: Laurent on January 25, 2013, 05:36:32 pm
The only workaround right now is to draw and process events in two separate threads.