snipplets.dev/code/SFML/appIcon.cpp

10 lines
182 B
C++
Raw Permalink Normal View History

2024-03-23 21:08:38 +03:00
// ...
auto image = sf::Image{};
if (!image.loadFromFile("cat.png"))
{
// Error handling...
}
window.setIcon(image.getSize().x, image.getSize().y, image.getPixelsPtr());
// ...