#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(280, 280), "SFML works!");

    sf::CircleShape circle0(20.f);
    circle0.setFillColor(sf::Color::Red);
    sf::CircleShape circle1(30.f);
    circle1.setFillColor(sf::Color::Green);
    sf::CircleShape circle2(40.f);
    circle2.setFillColor(sf::Color::Blue);
    
    sf::RectangleShape rectangle;
    rectangle.setSize(sf::Vector2f(200, 50));
    rectangle.setFillColor(sf::Color::Yellow);
    rectangle.setOutlineColor(sf::Color::Magenta);
    rectangle.setOutlineThickness(5);

    sf::Font font;
    if (!font.loadFromFile("Fonts/arial.ttf"))
    {
        std::cout << "Failed to load the font file.";
        return EXIT_FAILURE;
    }
    sf::Text text;
    text.setFont(font);
    text.setString("Hello, World!");
    text.setCharacterSize(24);
    text.setFillColor(sf::Color::Red);
    text.setStyle(sf::Text::Bold);

    circle0.setPosition(100, 100);
    circle0.setPosition(50, 150);
    circle1.setPosition(150, 150);
    rectangle.setPosition(50, 40);
    text.setPosition(80, 50);

    // Run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear(sf::Color::White);
        window.draw(circle0);
        window.draw(circle1);
        window.draw(circle2);
        window.draw(rectangle);
        window.draw(text);
        window.display();
    }

    return EXIT_SUCCESS;
}
