TGUI Forum

General Category => Help requests => Topic started by: Mikart on 12 November 2018, 19:56:33

Title: Trouble with loading theme
Post by: Mikart on 12 November 2018, 19:56:33
Hi!
I have problem with loading theme in my project.
Images:
https://imgur.com/a/h92o3dg (https://imgur.com/a/h92o3dg)

https://imgur.com/a/8s3QPmO (https://imgur.com/a/8s3QPmO)

I am using VS17

I do not know what I am doing wrong.
I found on forum one topic about this but it did not help me.

Title: Re: Trouble with loading theme
Post by: texus on 12 November 2018, 22:10:12
You can get the exact error by surrounding the code with a try-catch block:
try {
    // contents from main() function
} catch (const tgui::Exception& e) {
    std::cerr << e.what() << "\n";
}

If the error is that it can't find the file then make sure the theme file is located in the same folder as your executable.