I have this bit here in a separate source file:
#include "SFML/Graphics.hpp"
#include "WindowTest.h"
const int SCREEN_WIDTH = 550;
const int SCREEN_HEIGHT = 400;
const int SCREEN_BPP = 32;
sf::RenderWindow Window;
int WindowTest()
{
Window.Create(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP), "LOL", !sf::Style::Resize | sf::Style::Close);
while (Window.IsOpened())
{
sf::Event event;
while (Window.PollEvent(event))
{
switch (event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
}
}
}
return EXIT_SUCCESS;
}
I include it's header file, and I call "WindowTest();" whenever I'd like to open it. However, currently this doesn't work too well. The window does open, but it's occasionally a little shaky whenever I move it around. I also can't close the first window until I close this window, and the first window's "Close" button blinks a little bit too.
Should I handle the second window's logical in a separate thread? Or is there a better method to have multiple windows?
Thanks for any help!