Basic screen system

This commit is contained in:
Bram Verhulst
2024-04-02 10:17:20 +02:00
parent 0f9bb76973
commit df9e2f0b64
15 changed files with 404 additions and 410 deletions

14
Game/Gui/Screen.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include "Screen.h"
Screen::Screen(const std::string& filePath, Point2f pos, Point2f size,TextureManager* manager): m_Position(pos), m_Size(size)
{
m_Background = manager->GetTexture(filePath);
}
Screen::~Screen() {
}
void Screen::Update(float elapsedSecs) {
}
void Screen::Draw() const {
Rectf dest = Rectf(m_Position, m_Size);
Rectf src = Rectf(0,0, m_Background->GetWidth(), m_Background->GetHeight());
m_Background->Draw(dest, src, false);
}