Hi!
I am trying to make a Pong game, but I'm having some trouble with a function.
int Screen_1::Run (sf::RenderWindow &app)
{
Menu menu;
// If i put return 1 here, it works;
menu.addWidget ("Media/play.png", 330, 300, 150, 50);
// If I put it after I use the menu object, it doesn't work anymore;
// It returns a very large number, aprox. 24 milion
// Interestingly, it's always the same number
menu.addWidget ("Media/exit.png", 330, 380, 150, 50);
menu.addWidget ("Media/title.png", 250, 80, 300, 80);
...
}
Is it possible for an operation on the menu to affect the behaviour of the return statement?
The operations on the menu do not affect any variable in the function, except for app.
Thanks.