This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/main.cpp
2024-12-11 00:05:53 +01:00

37 lines
865 B
C++

#include <iostream>
#include "SFML/Graphics.hpp"
#include "headers/Plansza.h"
int main()
{
sf::RenderWindow mainWindow(sf::VideoMode(600, 800), "LotoStatek");
mainWindow.setVerticalSyncEnabled(true);
mainWindow.setFramerateLimit(60);
sf::Image icon;
icon.loadFromFile("../assets/img/icon/ikonka.png");
mainWindow.setIcon(128, 128, icon.getPixelsPtr());
Plansza plansza(mainWindow.getSize().y, mainWindow.getSize().x, &mainWindow);
while (mainWindow.isOpen()) {
mainWindow.clear();
// Tu są handlowane eventy
sf::Event event{};
while (mainWindow.pollEvent(event)) {
if(event.type == sf::Event::Closed || sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
mainWindow.close();
}
plansza.update();
mainWindow.display();
}
return 0;
}