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

Author Topic: Changing dynamically window contextsettings  (Read 1172 times)

0 Members and 1 Guest are viewing this topic.

Phanoo

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Changing dynamically window contextsettings
« on: January 22, 2018, 10:45:53 am »
Hello

In my program i need to change the window contextsettings dynamically, what I do atm is closing the window, destroying the window pointer, and re-creating it with the new parameters. It works, but I'd prefer to have a smooth change, without the user seeing the window being closed and re-opened. Is there a way to do that ?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10150
    • View Profile
    • development blog
    • Email
Re: Changing dynamically window contextsettings
« Reply #1 on: January 22, 2018, 11:02:08 am »
Use the create function on the window. It will still re-create the window, but that's just how SFML works. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Changing dynamically window contextsettings
« Reply #2 on: January 22, 2018, 09:38:04 pm »
It's also how a lot of games do it (ever had a game tell you to restart after changing some settings?)