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

Author Topic: Joysticks  (Read 6448 times)

0 Members and 2 Guests are viewing this topic.

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Joysticks
« on: January 18, 2008, 06:41:47 pm »
Why is axis the same as buttons?

Code: [Select]

sf::Event::JoyMove.Axis

is the same as
Code: [Select]

sf::Event::JoyButton.Button


What I mean is it gives the same ouput. Shouldn't JoyButton.Button give like -1 or something when just tilting an axis and JoyMove.Axis return -1 if I'm pressing a button?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Joysticks
« Reply #1 on: January 19, 2008, 04:20:04 am »
The JoyMove field is valid only when receiving a JoyMove event.
The same for JoyButton.
Laurent Gomila - SFML developer