-
When I hover my mouse over the resize-able area of the window (bottom and right edge) the cursor doesn't change as it should to the double arrow cursor
What triggers the error:
sf::RenderWindow.setMouseCursorVisible(true);
I am using:
default Window styles,
Sfml 2.0,
OS: Windows XP Professional, Sp.3,
Compiler: Qt Creator (Mingw internal)
My project isn't halted by this, its just annoying :-\
-
I can't reproduce your problem with this minimal code.
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(512, 256), "Particles");
window.setMouseCursorVisible(true);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.display();
}
return 0;
}
-
Hold on, been away a few days, ill go carve down my project to find exactly what is needed to make it act like this :-)
-
Triggered when setMouseCursorVisible was placed withing game loop (causing mouse image to be set to plain mouse?)
Possible fix: check if cursor is already visible before applying changes
#include <SFML/Graphics.hpp>
int main(){
sf::RenderWindow window(sf::VideoMode(512, 256), "Cursor-Test");
while (window.isOpen()){
sf::Event event;
while (window.pollEvent(event)){
if(event.type == sf::Event::Closed){
window.close();
}
}
// I had set cursor visible in my game loop, which seems to be the trigger
window.setMouseCursorVisible(true);
window.display();
}
return 0;
}
-
Ok. This function is not supposed to be called 60 times per second anyway, so... the fix is probably to use it properly: avoid calling it in the main loop ;)