Thanks for the quick response! I recompiled and everything worked as it should.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
#include <iostream>
#include <SFML/Graphics.hpp>
#include <TGUI/TGUI.hpp>
// Declare global variables
sf::RenderWindow appWindow;
tgui::Window guiWindow(appWindow);
int main()
{
appWindow.create( sf::VideoMode( 1024, 768, 32 ), "Test" );
guiWindow.setGlobalFont( "resources/DejaVuSans.ttf" );
tgui::EditBox::Ptr editBox(guiWindow);
editBox->load("resources/objects/Black.conf");
editBox->setPosition(40, 200);
editBox->setSize(300, 30);
editBox->setCallbackId(1);
editBox->bindCallback( tgui::EditBox::EditBoxCallbacks::ReturnKeyPressed );
while (appWindow.isOpen())
{
sf::Event event;
while (appWindow.pollEvent(event))
{
if (event.type == sf::Event::Closed)
appWindow.close();
guiWindow.handleEvent(event);
}
tgui::Callback callback;
while (guiWindow.pollCallback(callback))
{
if (callback.id == 1)
std::cout << "Return pressed\n";
}
appWindow.clear();
guiWindow.drawGUI();
appWindow.display();
}
return 0;
}