Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ivan

Pages: 1 2 [3]
31
General discussions / Thank You
« on: April 30, 2013, 11:28:09 pm »
Hi, I just discovered SFML some weeks ago and I still learning this great API.
Today I have seen the new website and downloaded the final 2.0 release. It looks awesome. Thank you Laurent for your work.

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600, 32), "Hello SFML forum");

    sf::Text message;
    sf::Font font;
    if (!font.loadFromFile("Font1.ttf"))
        return EXIT_FAILURE;

    message.setString("Hello SFML forum users, I'm Ivan");
    message.setFont(font);
    message.setCharacterSize(16);
    message.setColor(sf::Color(255, 255, 0, 255));
    message.setPosition(sf::Vector2f(20, 20));

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed ||
                event.key.code == sf::Keyboard::Escape)
                window.close();
        }

        window.clear(sf::Color::Black);
        window.draw(message);
        window.display();
    }

    return EXIT_SUCCESS;
}

Pages: 1 2 [3]