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

Author Topic: sfml vs sfml 2.0 key events  (Read 1322 times)

0 Members and 1 Guest are viewing this topic.

krrice

  • Newbie
  • *
  • Posts: 26
    • View Profile
sfml vs sfml 2.0 key events
« on: November 12, 2011, 09:54:01 pm »
I m following the tutorials on 1.6 .The one on opengl. When I try to compile it give me errors on the key events.

this is the line giving the errors:

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();

I have read that you use keyboard instead of key but what would the line of code be?

Is there a code sheet showing the differences and how to write them?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sfml vs sfml 2.0 key events
« Reply #1 on: November 12, 2011, 11:09:58 pm »
Look at the online documentation, it is up to date.
Laurent Gomila - SFML developer

 

anything