#include "Salamander.h"
#include "ScreenManager.h"

#include "Screen.h"

namespace Salamander
{

defineUniqueId(ScreenManager);
ScreenManager::ScreenManager()
{
    resolution_ = Vec2(800.0, 600.0);
}

ScreenManager::~ScreenManager()
{

}

bool ScreenManager::startup()
{
	return true;
}

bool ScreenManager::shutdown()
{
	while(screens_.size())
	{
		delete screens_.back();
		screens_.pop_back();
	}
	return true;
}

void ScreenManager::frame()
{
}

bool ScreenManager::getIsCursorVisible()
{
	return isCursorVisible_;
}

void ScreenManager::setIsCursorVisible(bool value)
{
	isCursorVisible_ = value;
}

Vec2 ScreenManager::getResolution()
{
	return resolution_;
}

void ScreenManager::setResolution(Vec2 resolution)
{
	resolution_ = resolution;
}

void ScreenManager::push_screen(Screen* screen)
{
	screens_.push_back(screen);
}

Screen* ScreenManager::pop_screen()
{
	Screen* back = screens_.back();
	screens_.pop_back();
	return back;
}

}

