Add Alot
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "Screen.h"
|
||||
|
||||
#include "colors.h"
|
||||
#include "utils.h"
|
||||
|
||||
Screen::Screen(const std::string& filePath, Vector2f pos, Vector2f size, TextureManager* manager): m_Position(pos), m_Size(size) {
|
||||
if (!filePath.empty()) {
|
||||
m_Background = manager->GetTexture(filePath);
|
||||
@@ -23,6 +26,7 @@ void Screen::Update(float elapsedSecs) {
|
||||
}
|
||||
}
|
||||
void Screen::Draw() const {
|
||||
utils::SetColor(Colors::WHITE);
|
||||
if (m_Background != nullptr) { //Incase there is no background
|
||||
Rectf dest = Rectf(m_Position, m_Size);
|
||||
Rectf src = Rectf(0, 0, m_Background->GetWidth(), m_Background->GetHeight());
|
||||
|
||||
Reference in New Issue
Block a user