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

@@ -15,29 +15,29 @@ FuelScreen::FuelScreen(const std::string& filePath, Vector2f pos, Vector2f size,
const Vector2f closeButtonOffset = Vector2f { 460, 396 - 14 };
Vector2f closeButtonPos = fuelScreenCenter + closeButtonOffset;
closeButtonPos.y -= 18;
Button* closeFuelButton = new Button { "gui/close.png", closeButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
GuiButton* closeFuelButton = new GuiButton { "gui/close.png", closeButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
closeFuelButton->SetOnClick([this]() { ScreenManager::GetInstance()->CloseScreen(); });
this->AddButton(closeFuelButton);
this->AddElement(closeFuelButton);
const Vector2f oneDollarButtonPos = Vector2f { 451, 287 };
Button* fiveDollarButton = new Button { "gui/fuel/5dollars.png", oneDollarButtonPos , Vector2f{0,0}, TextureManager::GetInstance() };
this->AddButton(fiveDollarButton);
GuiButton* fiveDollarButton = new GuiButton { "gui/fuel/5dollars.png", oneDollarButtonPos , Vector2f{0,0}, TextureManager::GetInstance() };
this->AddElement(fiveDollarButton);
const Vector2f tenDollarButtonPos = oneDollarButtonPos + Vector2f { 113, -1 };
Button* tenDollarButton = new Button { "gui/fuel/10dollars.png", tenDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddButton(tenDollarButton);
GuiButton* tenDollarButton = new GuiButton { "gui/fuel/10dollars.png", tenDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddElement(tenDollarButton);
const Vector2f twentyFiveDollarButtonPos = oneDollarButtonPos + Vector2f { 0, -89 };
Button* twentyFiveDollarButton = new Button { "gui/fuel/25dollars.png", twentyFiveDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddButton(twentyFiveDollarButton);
GuiButton* twentyFiveDollarButton = new GuiButton { "gui/fuel/25dollars.png", twentyFiveDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddElement(twentyFiveDollarButton);
const Vector2f fiftyDollarButtonPos = twentyFiveDollarButtonPos + Vector2f { 114, 0 };
Button* fiftyDollarButton = new Button { "gui/fuel/50dollars.png", fiftyDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddButton(fiftyDollarButton);
GuiButton* fiftyDollarButton = new GuiButton { "gui/fuel/50dollars.png", fiftyDollarButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddElement(fiftyDollarButton);
const Vector2f fillTankButtonPos = Vector2f { 450, 108 };
Button* fillTankButton = new Button { "gui/fuel/fillTank.png", fillTankButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddButton(fillTankButton);
GuiButton* fillTankButton = new GuiButton { "gui/fuel/fillTank.png", fillTankButtonPos, Vector2f{0,0}, TextureManager::GetInstance() };
this->AddElement(fillTankButton);
}