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

Pages: 1 2 3 [4]
46
Commenting the code has the same effect for me: setSize appears to work as intended. Unfortunately, removing said "hack" also allows the user to change the size of the window, effectively making all windows resizeable.

47
Can you try SFML 2.1?
Done.

Assuming I installed SFML 2.1 correctly, the bug still persists. Any idea what is causing this?

48
I am on Linux (Linux Mint with MATE, if it helps). I also am using SFML 2.0.

49
I do not know if this is a bug with SFML or not, but the sf::Window::setSize function does not resize the window if the sf::Style::Resize flag is not passed to sf::Window::Create, as shown below.

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

int main()
{
        // Create the window
        sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Titlebar | sf::Style::Close /*| sf::Style::Resize*/);
        window.setSize(sf::Vector2u(320,240));

        // Create a simple shape
        sf::CircleShape shape(100.f);
        shape.setFillColor(sf::Color::Green);
        shape.setPosition(400, 240);

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();
                }

                window.clear();
                window.draw(shape);
                window.display();
        }

        return 0;
}

If sf::Style::Resize is uncommented, the window will resize just fine. Is this expected behaviour? If it is, how would you allow the window to be resizeable, but not allow the user to resize it directly (by dragging the corner of the window)?

Pages: 1 2 3 [4]