I'm having a problem where I open up my game, the screen opens and when I hit exit a 2nd window opens asking if you're sure.
When this window spawns I cannot click and drag the box or click close when the box spawns on top of the 1st window.
Meaning if I spawn the 2nd window, click back to the 1st then drag it out of the way I can now click and move the window.
Also I've assigned a keypress so if you hit Return while this 2nd window is open it will close everything, this does work perfectly fine, the only problem is clicking and dragging the actual box.
The way I do it is...
while (Game.pollEvent(Event))
{
if ((Event.type == sf::Event::Closed) || (sf::Keyboard::isKeyPressed(sf::Keyboard::LAlt) && sf::Keyboard::isKeyPressed( sf::Keyboard::F4)) || (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)))
{
CreateExit(sf::VideoMode(300,100), sf::String("Exit?"));
}
}
while(ExitScreen.isOpen())
{
while (ExitScreen.pollEvent(Event))
{
if ((Event.type == sf::Event::Closed))
{
ExitScreen.close();
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Return))
{
Game.close();
ExitScreen.close();
}
}
}