Fix digging

This commit is contained in:
Bram Verhulst
2024-05-07 10:35:18 +02:00
parent 77784a167e
commit d3b932df22
20 changed files with 406 additions and 83 deletions

View File

@@ -5,12 +5,12 @@ Screen::Screen(const std::string& filePath, Vector2f pos, Vector2f size, Texture
m_Background = manager->GetTexture(filePath);
}
Screen::~Screen() {
for (Button* b : m_Buttons) {
for (GuiElement* b : m_Elements) {
delete b;
}
}
void Screen::Update(float elapsedSecs) {
for (Button* b : m_Buttons) {
for (GuiElement* b : m_Elements) {
b->Update(elapsedSecs);
}
}
@@ -19,7 +19,7 @@ void Screen::Draw() const {
Rectf src = Rectf(0, 0, m_Background->GetWidth(), m_Background->GetHeight());
m_Background->Draw(dest, src, false);
for (Button* b : m_Buttons) {
for (GuiElement* b : m_Elements) {
b->Draw();
}
}