Update Screen system

Added FuelScreen (Working buttons)
Added SellScreen (Nothing working)
This commit is contained in:
Bram Verhulst
2024-04-04 00:07:45 +02:00
parent df9e2f0b64
commit eb4c7b4d76
20 changed files with 759 additions and 45 deletions

View File

@@ -6,9 +6,16 @@ Screen::Screen(const std::string& filePath, Point2f pos, Point2f size,TextureMan
Screen::~Screen() {
}
void Screen::Update(float elapsedSecs) {
for(Button* b : m_Buttons) {
b->Update(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);
for(Button* b: m_Buttons) {
b->Draw();
}
}