Hi,
While trying to set the size and position of a button with TGUI I am receiving an access violation error. I am using Visual Studio 2015 community, I downloaded the precompiled library, and I am linking dynamically. This is the code that is causing the error:
The code runs with no errors without the setPosition and setSize, leading me to believe that they are the ones causing the issue. Any help is highly appreciated, thanks!
While trying to set the size and position of a button with TGUI I am receiving an access violation error. I am using Visual Studio 2015 community, I downloaded the precompiled library, and I am linking dynamically. This is the code that is causing the error:
Code Select
#include "Sidebar.h"
#include "App.h"
std::shared_ptr<tgui::Button> Sidebar::homeButton()
{
tgui::Button::Ptr button = tgui::Button::create("Home");
button->setPosition(500, 200);
button->setSize(200, 200);
App app;
app.gui.add(button, "homeButton");
return button;
}
The code runs with no errors without the setPosition and setSize, leading me to believe that they are the ones causing the issue. Any help is highly appreciated, thanks!