Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <SFML/Graphics.hpp> | ||
|
||
int renderSplashScreen() | ||
{ | ||
|
||
//window is rendered as 800*600 (size), and its title is "Coventry University" | ||
sf::RenderWindow window(sf::VideoMode(800, 600), "Coventry University"); | ||
|
||
|
||
//loads the background, first it is loaded as a texture and then it is turned into a sprite | ||
sf::Texture splashBackground; | ||
splashBackground.loadFromFile("images/splashBackground.png"); | ||
|
||
sf::Sprite splashBackgroundSprite(splashBackground); | ||
|
||
|
||
window.draw(splashBackgroundSprite); | ||
window.display(); | ||
|
||
|
||
//loop that gives delay to the function renderSplashScreen and makes it stay longer on the window | ||
int i = 1; | ||
while (i < 999999995) | ||
{ | ||
i++; | ||
}; | ||
|
||
|
||
return 0; | ||
|
||
} |