SFML community forums

Help => General => Topic started by: Tigre Pablito on October 31, 2017, 06:24:33 pm

Title: How set window focus? SFML.Net
Post by: Tigre Pablito on October 31, 2017, 06:24:33 pm
Hello

How can I focus my window from code? I have to click on it to make it work normally (capture events)

I call window.SetActive(true) after assigning event handlers and before the main loop starts but doesn't work

I'm using SFML.Net 2.2

Thanks
Title: Re: How set window focus? SFML.Net
Post by: Laurent on October 31, 2017, 06:39:25 pm
https://www.sfml-dev.org/documentation/2.4.2/classsf_1_1Window.php#a58cf7fa1775e8e7542032e3ecfa83b49

But I think it was added in SFML 2.4, so you may have to upgrade.
Title: Re: How set window focus? SFML.Net
Post by: Tigre Pablito on October 31, 2017, 07:04:29 pm
Is it available SFML.NET 2.4? I have just searched and only found SFML.NET 2.3 and it seems there is only the source code ... so which version should I use (for C#)? And where can I get it (the DLLs)?
Thanks
Title: Re: How set window focus? SFML.Net
Post by: Laurent on October 31, 2017, 08:20:16 pm
You can safely use 2.4 (it's tagged on the repository) but you'll have to compile it yourself.