#include "Wumbo-Texture.h"
#include "Wumbo-Functions.h"
#include "Wumbo-Sprite.h"
#include "Wumbo-Renderer.h"
#include "Wumbo-Types.h"
#include "scTitle.h"
#include "scYouLose.h"
#include "Wumbo-InputManager.h"
#include "Wumbo-KeyboardInput.h"

Wumbo::Texture *texDisplay3;
Wumbo::Sprite *sprDisplay3;

scYouLose::scYouLose()
{
	program = NULL;
}
scYouLose::scYouLose(Wumbo::Program *prog)
{
	program = prog;
}
void scYouLose::begin()
{
	texDisplay3 = new Wumbo::Texture();
	texDisplay3->load(Wumbo::BundleResource("youlose.png"));

	Wumbo::Renderer *rend = program->getRenderer();
	
	sprDisplay3 = new Wumbo::Sprite(rend);
	sprDisplay3->setTexture(texDisplay3);
	sprDisplay3->setSubrect(0,0,0,1,1);
	sprDisplay3->setSize(1024,768);

}
void scYouLose::update()
{
}
void scYouLose::render()
{
	glClearColor(0.6f,0.6f,0.6f,1.f);
	glClear(GL_COLOR_BUFFER_BIT);
	texDisplay3->bind();
	sprDisplay3->setPosition(0,0);
	sprDisplay3->draw();
	if (program->getInputManager()->getKeyboardState()->isKeyPressed(sf::Keyboard::Return))
		program->setScene(new scTitle(program));
}
void scYouLose::end()
{
	delete sprDisplay3;
	delete texDisplay3;
}
void scYouLose::onClose()
{
}
