SFML community forums

Help => Window => Topic started by: FIWE on March 17, 2019, 01:52:00 pm

Title: Rounded SFML window
Post by: FIWE on March 17, 2019, 01:52:00 pm
Hello!

I am quite new to SFML and I am trying to render a window where the edges are rounded. When displaying a window that has its style set to none, the edges gets edgy. Is there any way to fix this without having the window style containing a titlebar?

Thanks in advance.
Title: Re: Rounded SFML window
Post by: eXpl0it3r on March 17, 2019, 02:01:46 pm
SFML doesn't support transparent or special shaped windows.

You could take a look at Texus' Transparent Window class: https://github.com/texus/TransparentWindows
Title: Re: Rounded SFML window
Post by: FIWE on March 17, 2019, 02:12:01 pm
Ok, thank you anyways.
Title: Re: Rounded SFML window
Post by: degski on April 14, 2019, 11:04:08 am
I have done some work on this and just for having something to apply it too I created my first Pong, here's a screenshot:

(https://raw.githubusercontent.com/degski/pong/master/Screenshot.png)

The repo is https://github.com/degski/pong (the above image is resized there)

It depends on https://github.com/degski/Sax (just C++-stuff), and the bit where the transparent/rounded (any shape really) Window related stuff gets done https://github.com/degski/SFML-Extensions (notably: https://github.com/degski/SFML-Extensions/blob/master/sfml-extensions/Extensions.cpp as from line 98).

Needless to say that this kind of manip is Windows only.