Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to use sf::Window::ShowMouseCursor(); properly?  (Read 3388 times)

0 Members and 1 Guest are viewing this topic.

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
How to use sf::Window::ShowMouseCursor(); properly?
« 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);

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to use sf::Window::ShowMouseCursor(); properly?
« Reply #1 on: August 27, 2010, 10:59:39 pm »
Code: [Select]
App.ShowMouseCursor(false)
Laurent Gomila - SFML developer

Finn

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
How to use sf::Window::ShowMouseCursor(); properly?
« Reply #2 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

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
How to use sf::Window::ShowMouseCursor(); properly?
« Reply #3 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.

 

anything