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

Pages: [1]
1
Graphics / Re: window out of screen
« on: June 11, 2013, 06:11:44 pm »
Hi,

I will explain better what I need:
I want to implement a window movimentation where the user clicks on a area of the window and this moves together with the mouse. But when the user moves the window near of the edge of the screen, the window stops in the edge, not following the mouse (when a portion of the screen should be out of screen)! I tested my code and if I set a value to the window.setPosition that overflow the value of the edge, the setPosition truncates my value to stay in the edge of the screen!!!

I cannot move a window to out of screen or I am doing something wrong???


Thank you!
Carlos Pereira

2
Graphics / window out of screen
« on: June 03, 2013, 02:54:56 pm »
Hi,

I would like know how to move a window partly out of screen. I set the position using window.setPosition, but the window goes to edge of screen, and the window.getPosition returns the value of the window in this position (the edge of screen), not the value that I set (bigger than the value returned).


Thanks,
Carlos

3
Graphics / [SOLVED] delimit print area
« on: March 18, 2013, 04:41:03 am »
The sf::RenderTexture resolved the problem! =)

4
Graphics / [SOLVED] delimit print area
« on: March 18, 2013, 04:03:34 am »
Hi,

Is there a way to limit the print area for the sf::Text? I want to print a text inside a box, but if the text is bigger than the box, only the text that fits the box shall be visible (including parts of characters, such a half glyph...).


Thank you,
Carlos

5
Graphics / Re: accent marks
« on: March 18, 2013, 12:31:52 am »
Using the std::wstring works fine!

Thank you very much!!

6
Graphics / [SOLVED] accent marks
« on: March 17, 2013, 03:25:22 am »
Hi,

I need some help about displaying a std::string with special characters (accent marks, such as á, é, ã, ...).
I tried this to test the sf::string and std::string:

        sf::String str;
        std::string str2;

        ...

        while (window.pollEvent(event)) {
                ...
                case sf::Event::TextEntered:
                        str += event.text.unicode;
                        str2 += event.text.unicode;
                ...
        }

        window.draw(sf::Text(str));
        window.draw(sf::Text(str2));

The first draw draws correctly, but the second just shows a square for every special character (extended ascii codes, ie, event.text.unicode > 127).

But I need to use the std::string to manipulate strings, thus I can't use the first draw!!! And I can't display the text correctly using this class!!!

Can somebody help me?

PS.: I'm using the SFML 2.0.

Thank you,
Carlos

Pages: [1]