Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Event
Print
Pages: [
1
]
Author
Topic: Event (Read 1510 times)
0 Members and 1 Guest are viewing this topic.
wvtrammell
Jr. Member
Posts: 70
Event
«
on:
October 28, 2010, 04:47:23 pm »
Which is proper to use in graphics:
If(App.GetInput().IsKeyDown(sf::Key::F1))
or
if(Event.Type == sf::Event::KeyPressed):: && (Event.Key.Code == sf::Key::F1))
They both appear to function.
Thanks
Warren
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Event
«
Reply #1 on:
October 28, 2010, 04:54:06 pm »
The first one will return true
as long as the key is down
.
With the second one, you will be notified
once when the key is pressed
.
So it depends what you want to do.
Have you read the events tutorial?
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Event
anything