SFML community forums

General => SFML projects => Topic started by: JayhawkZombie on February 08, 2017, 05:00:12 am

Title: File Browser in SFML (Updated)
Post by: JayhawkZombie on February 08, 2017, 05:00:12 am
**Update: Created a FileBrowser class to handle this, added the ability to differentiate between files and folders, and added a way to signal a file was selected**

I decided to try to bang out a file browser using SFML and TGUI.  It's not pretty, but I wasn't going for that. I just wanted functionality.

It uses C++17's filesystem header, under std::experimental::filesystem::v1.  I compiled it using Visual Studio 2015, so I can't say if it would work on anything else.

If nothing else, perhaps someone can use it to see how I worked my way around the file system.
In the image below, you can see the trace I printed to the console as I went around.  Stopped on a fellow SFML work, Cendric (not to promote or anything, would never do that).

(http://i.imgur.com/dTVqfo7.png)

Code: 
https://github.com/JayhawkZombie/SFMLFileBrowser/tree/master

If you feel like watching it work:
https://youtu.be/VGxPEJAelD0

Edit: a more pretty version, embedded in our engine (still incomplete) 
https://youtu.be/neJIhxs6Mbk