Here is my code:
Pretty much a copy of the tutorial, with some modifications.
So, I build and the console and window comes up(completely white). Pauses for a few seconds, and stops working.
I have a form.txt and images folder from the form builder app. So I do not know what is wrong.
Code Select
#include <TGUI/TGUI.hpp>
int main()
{
// Create the window
sf::RenderWindow window(sf::VideoMode(1024,576), "Window");
tgui::Gui gui(window);
gui.loadWidgetsFromFile("form.txt");
// Load the font (you should check the return value to make sure that it is loaded)
gui.setGlobalFont("fonts/DejaVuSans.ttf");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
// Pass the event to all the widgets (if there would be widgets)
gui.handleEvent(event);
}
window.clear();
// Draw all created widgets
gui.draw();
window.display();
}
return EXIT_SUCCESS;
}
Pretty much a copy of the tutorial, with some modifications.
So, I build and the console and window comes up(completely white). Pauses for a few seconds, and stops working.
I have a form.txt and images folder from the form builder app. So I do not know what is wrong.