mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2025-02-24 14:03:54 +01:00
27 lines
849 B
C++
27 lines
849 B
C++
|
//
|
||
|
// Created by symeon on 06/04/19.
|
||
|
//
|
||
|
|
||
|
#include "BlankScreen.h"
|
||
|
|
||
|
BlankScreen::BlankScreen() : gris_de_fond(sf::Color(38, 38, 38)) {
|
||
|
|
||
|
if(!tex_FEIS_logo.loadFromFile("assets/textures/FEIS_logo.png"))
|
||
|
{
|
||
|
throw std::__cxx11::string("Unable to load assets/textures/FEIS_logo.png");
|
||
|
}
|
||
|
tex_FEIS_logo.setSmooth(true);
|
||
|
FEIS_logo.setTexture(tex_FEIS_logo);
|
||
|
FEIS_logo.setColor(sf::Color(255, 255, 255, 32)); // un huitième opaque
|
||
|
|
||
|
}
|
||
|
|
||
|
void BlankScreen::render(sf::RenderWindow& window) {
|
||
|
// effacement de la fenêtre en noir
|
||
|
window.clear(gris_de_fond);
|
||
|
|
||
|
// c'est ici qu'on dessine tout
|
||
|
FEIS_logo.setPosition(sf::Vector2f(static_cast<float>((window.getSize().x - tex_FEIS_logo.getSize().x) / 2),
|
||
|
static_cast<float>((window.getSize().y-tex_FEIS_logo.getSize().y)/2)));
|
||
|
window.draw(FEIS_logo);
|
||
|
}
|