SFML community forums

Help => Window => Topic started by: Zamadatix on August 27, 2010, 10:55:32 pm

Title: How to use sf::Window::ShowMouseCursor(); properly?
Post by: Zamadatix on August 27, 2010, 10:55:32 pm
I'm trying to find out where/how to use sf::Window::ShowMouseCursor(false) in my program to hide the mouse cursor but I keep getting an error:

Code: [Select]
error: cannot call member function 'void sf::Window::ShowMouseCursor(bool)' without object|

I've tried putting it everwhere in this section (this seems like the logical place but it gives the above error):
Code: [Select]

sf::RenderWindow App(sf::VideoMode::GetMode(0), "SFML", sf::Style::Fullscreen, sf::WindowSettings::WindowSettings ( 24, 8, 16));
    sf::Window::ShowMouseCursor(false);
Title: How to use sf::Window::ShowMouseCursor(); properly?
Post by: Laurent on August 27, 2010, 10:59:39 pm
Code: [Select]
App.ShowMouseCursor(false)
Title: How to use sf::Window::ShowMouseCursor(); properly?
Post by: Finn on August 27, 2010, 11:05:02 pm
I've noticed that with Linux u have to put it into the GameLoop. So every loop the Mousecursor is invisible. If you just call it once somewhere it changes back to true, somehow :-S
Title: How to use sf::Window::ShowMouseCursor(); properly?
Post by: Zamadatix on August 27, 2010, 11:08:33 pm
Quote from: "Laurent"
Code: [Select]
App.ShowMouseCursor(false)


Thanks Laurent... I know realize how stupid that mistake was lol.