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 - fedot89

Pages: [1]
1
General / Stop the Windows
« on: November 15, 2010, 10:51:49 am »
where i find some fonts?

2
General / Stop the Windows
« on: November 15, 2010, 10:37:04 am »
Why after i compile my window dont stop? he disapaire very fast.

getch(); Failed

Here is the code.


Code: [Select]

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


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Fonts");

    // Load a font from a file
    sf::Font MyFont;
    if (!MyFont.LoadFromFile("comic.ttf", 50))
        return EXIT_FAILURE;

    // Create a graphical string
    sf::String Hello;
    Hello.SetText("Hello !\nHow are you ?");
    Hello.SetFont(MyFont);
    Hello.SetColor(sf::Color(0, 128, 128));
    Hello.SetPosition(100.f, 100.f);
    Hello.SetRotation(15.f);
    Hello.SetSize(50.f);

    // You can also use the constructor
    sf::String Bonjour("Salut !\nComment ça va ?", sf::Font::GetDefaultFont(), 30.f);
    Bonjour.SetColor(sf::Color(200, 128, 0));
    Bonjour.SetPosition(200.f, 300.f);

    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Make the second string rotate
        Bonjour.Rotate(App.GetFrameTime() * 100.f);

        // Clear screen
        App.Clear();

        // Draw our strings
        App.Draw(Hello);
        App.Draw(Bonjour);

        // Finally, display rendered frame on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}

3
Graphics / Hello! I'm begginer and i need some help!
« on: November 15, 2010, 09:48:30 am »
Hello! Someone can help me whit my litle program?
I started to create a program to be like this:  

My first code's in SFML are:

Code: [Select]

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


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "Fortune");

    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw predefined shapes
        App.Draw(sf::Shape::Circle(50, 50, 25, sf::Color::Yellow, 10));

        // Build a custom convex shape
       

        // Finally, display the rendered frame on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


I insert the first circle but i need 79 numbers more :D .

Pages: [1]