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

Author Topic: keyboard events  (Read 1061 times)

0 Members and 2 Guests are viewing this topic.

gingger

  • Newbie
  • *
  • Posts: 1
    • View Profile
keyboard events
« on: January 06, 2018, 08:53:02 am »
 i just want to when you pres the exit button or press esc the window closes.
         // help here // i wont it to close the program when you pres the escape key
         if (event.type == sf::Event::Closed || event.type == sf::Event::EventType::KeyPressed Escape)
   
« Last Edit: January 06, 2018, 11:06:14 pm by gingger »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: keyboard events
« Reply #1 on: January 06, 2018, 10:30:06 am »
So you can't even provide a description? Read the official tutorials.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything