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

Author Topic: Dynamic window resize events (i.e., before mouse is released)  (Read 2732 times)

0 Members and 1 Guest are viewing this topic.

Submerged

  • Newbie
  • *
  • Posts: 2
    • View Profile
Dynamic window resize events (i.e., before mouse is released)
« 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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Dynamic window resize events (i.e., before mouse is released)
« Reply #1 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Submerged

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Dynamic window resize events (i.e., before mouse is released)
« Reply #2 on: January 25, 2013, 04:57:03 pm »
Thanks eXpl0it3r :) I figured as much. I appreciate the response!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Dynamic window resize events (i.e., before mouse is released)
« Reply #3 on: January 25, 2013, 05:14:45 pm »
Yeah, we don't support that.. But if someone find a solution I'm always listening !
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Dynamic window resize events (i.e., before mouse is released)
« Reply #4 on: January 25, 2013, 05:36:32 pm »
The only workaround right now is to draw and process events in two separate threads.
Laurent Gomila - SFML developer