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

Pages: [1]
1
General discussions / Thanks
« on: November 04, 2010, 01:13:20 pm »
22222 messages on the english forum ! thanx Laurent for the SFML !

2
General discussions / CMake tutorial added
« on: October 30, 2010, 12:03:31 pm »
sorry I did a mistake :D

3
Graphics / Artifacts in isometric view
« on: October 29, 2010, 12:24:53 pm »
sf::Image::SetSmooth(false) ?

4
Graphics / Key Pressed
« on: October 28, 2010, 11:27:57 pm »
I took a little time to rewrite your code (very confuse), and saw the extra semicolon too. I really suggest you to read some tutorials on C + + and those of the SFML to improve your current programming level.

Code: [Select]
#include <SFML/Graphics.hpp>
#include <list>

// Set the program's constants
const float Width = 1200;
const float Height = 800;
const sf::Color BackgroundColor(120, 120, 120);

// Create our shape list
std::list<sf::Shape> myCircles;

// A function to generate a random circle
void RandomizeCircle(std::list<sf::Shape>& shapeList, float width, float height)
{
// Get some random values to our future circle
float s = sf::Randomizer::Random(10,       50); // size
float x = sf::Randomizer::Random( s,  width-s); // pos x
float y = sf::Randomizer::Random( s, height-s); // pos y
float r = sf::Randomizer::Random( 0,      255); // color R
float v = sf::Randomizer::Random( 0,      255); // color V
float b = sf::Randomizer::Random( 0,      255); // color B

// Create and add the new circle to the list
shapeList.push_back(sf::Shape::Circle(x, y, s, sf::Color(r, v, b)));
}

int main()
{

    // Create main window
    sf::RenderWindow App(sf::VideoMode(Width, Height), "SFML Graphics");

    // Save the planet, don't waste CPU resources for nothing
    App.SetFramerateLimit(60);

   // 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();

            // Push up key : generate a circle
            if(Event.Type == sf::Event::KeyPressed && Event.Key.Code == sf::Key::Up)
            RandomizeCircle(myCircles, Width, Height);
        }

        // Clear the screen
        App.Clear(BackgroundColor);

        // Draw the shape list
        for( std::list<sf::Shape>::const_iterator it = myCircles.begin(); it != myCircles.end(); ++it )
        App.Draw(*it);

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

    }


    return EXIT_SUCCESS;
}

5
SFML wiki / /!\ List of GUI based on SFML /!\
« on: August 23, 2010, 03:02:48 pm »
Sorry, the post isn't up to date. I will update It soon, but I am convinced that if someone could put It on the wiki, it would be good for everyone.

EDIT : Updated

6
SFML wiki / /!\ List of GUI based on SFML /!\
« on: April 22, 2010, 09:21:34 pm »
Hello everybody,

This post is for talkin' about the wiki page which lists all the GUI based on SFML, that we can found at this adress.
Don't hesitate to add your comments.

Thank you a lot !

7
Feature requests / Getting/setting title of sf::Window?
« on: March 07, 2010, 05:35:36 pm »
All "Mac Os like menues" in my GUI need to know the SFML window's title, because the first entry inside is this title precisely.

8
Feature requests / Getting/setting title of sf::Window?
« on: March 07, 2010, 05:30:22 pm »
Yes It is. I need this method for my future GUI, beucause actually I must save the title string for using it after and It is not very stylish.

9
General / Where SFML 2.0
« on: January 04, 2010, 03:02:36 pm »

10
General discussions / .exe not working on Windows 7
« on: January 01, 2010, 03:36:14 pm »
I'm working on code::blocks release 8.02 with default compiler option and I linked dynamic SFML librairies.

11
General discussions / .exe not working on Windows 7
« on: January 01, 2010, 12:29:07 pm »
But I've no problem to run a 32 bits SFML program on my 64 bits Windows Seven  :?

12
General discussions / Merry Xmas !
« on: December 31, 2009, 11:29:27 pm »
And happy new year !  :D

13
General discussions / Merry Xmas !
« on: December 24, 2009, 08:20:02 pm »
Happy days everyone ! I wish you good moments with your family !  :D

14
Feature requests / New class for SFML2: TextArea.
« on: December 19, 2009, 04:53:07 pm »
OMGad, that's impressive ! :shock:
Congratulations !   :)

PS: My text formating fonction looks like tiny compared to your class... :oops:

15
Feature requests / New class for SFML2: TextArea.
« on: December 18, 2009, 06:09:56 pm »
I think they will find this feature in the wiki (if you put it inside) !  :D

Pages: [1]