début de qqch

This commit is contained in:
2025-03-30 13:07:17 +02:00
parent 314b7a8488
commit 5d73e751d7
6 changed files with 48 additions and 13 deletions

View File

@@ -80,4 +80,11 @@ class AppMenu {
text.setPosition(sf::Vector2f({sizeMultiplier * 40.f, sizeMultiplier * yPos}));
this->renderWindow->draw(text);
}
sf::Color getColorOfBlock(Block block, int luminosityShift) const {
Color rgbColor = BLOCKS_COLOR[block];
return sf::Color(std::clamp(rgbColor.red + luminosityShift, 0, 255),
std::clamp(rgbColor.green + luminosityShift, 0, 255),
std::clamp(rgbColor.blue + luminosityShift, 0, 255));
}
};