GameState now only defines window limits

GameState now only defines window limits. RenderWindow is now set to be a separate object left in the main method.

Noted issues if put into GameState: Window never opens and the program just ends.
This commit is contained in:
TriantaTV
2022-07-29 15:53:59 -05:00
parent 1a90a4601a
commit 19b91b78d2
3 changed files with 20 additions and 14 deletions
+6 -6
View File
@@ -7,9 +7,9 @@ GameState::GameState()
{
videoSizeHorizontal = 1024;
videoSizeVertical = 725;
sf::Vector2u newVideoSize(videoSizeHorizontal, videoSizeVertical);
window.setSize(newVideoSize);
window.setTitle("SnakePlusPlus");
// sf::Vector2u newVideoSize(videoSizeHorizontal, videoSizeVertical);
// window.setSize(newVideoSize);
// window.setTitle("SnakePlusPlus");
return;
}
@@ -17,8 +17,8 @@ GameState::GameState(int newHorizontal, int newVertical)
{
videoSizeHorizontal = newHorizontal;
videoSizeVertical = newVertical;
sf::Vector2u newVideoSize(videoSizeHorizontal, videoSizeVertical);
window.setSize(newVideoSize);
window.setTitle("SnakePlusPlus");
// sf::Vector2u newVideoSize(videoSizeHorizontal, videoSizeVertical);
// window.setSize(newVideoSize);
// window.setTitle("SnakePlusPlus");
return;
}