SFML community forums

Help => Window => Topic started by: JasonLeon on May 09, 2025, 07:00:14 pm

Title: How can I resize the window by code?
Post by: JasonLeon on May 09, 2025, 07:00:14 pm
I tried to use window.setSize, but only changed the rendering region.

Is there any way to resize the window not by restarting?
Title: Re: How can I resize the window by code?
Post by: eXpl0it3r on May 10, 2025, 01:14:13 am
Handle the resize event and set the view accordingly: https://www.sfml-dev.org/tutorials/3.0/graphics/view/#using-a-view
Title: Re: How can I resize the window by code?
Post by: JasonLeon on May 10, 2025, 06:29:15 pm
Handle the resize event and set the view accordingly: https://www.sfml-dev.org/tutorials/3.0/graphics/view/#using-a-view
Thank you. I forgot to set view. ;D