From 2f9a47b463e6cae6cd97614a45c2247d86f89d34 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 6 May 2011 14:03:15 +0200 Subject: [PATCH] Minor fixes in documentation related to joysticks --- include/SFML/Window/Event.hpp | 8 ++++---- include/SFML/Window/Input.hpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index 1d900b52..5d1b8834 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -266,9 +266,9 @@ public : //////////////////////////////////////////////////////////// struct JoyMoveEvent { - unsigned int JoystickId; ///< Index of the joystick (0 or 1) + unsigned int JoystickId; ///< Index of the joystick (in range [0 .. Joy::Count - 1]) Joy::Axis Axis; ///< Axis on which the joystick moved - float Position; ///< New position on the axis (in range [-100, 100]) + float Position; ///< New position on the axis (in range [-100 .. 100]) }; //////////////////////////////////////////////////////////// @@ -278,8 +278,8 @@ public : //////////////////////////////////////////////////////////// struct JoyButtonEvent { - unsigned int JoystickId; ///< Index of the joystick (0 or 1) - unsigned int Button; ///< Index of the button that has been pressed + unsigned int JoystickId; ///< Index of the joystick (in range [0 .. Joy::Count - 1]) + unsigned int Button; ///< Index of the button that has been pressed (in range [0 .. Joy::ButtonCount - 1]) }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Input.hpp b/include/SFML/Window/Input.hpp index a7dacc56..03cbce58 100644 --- a/include/SFML/Window/Input.hpp +++ b/include/SFML/Window/Input.hpp @@ -75,8 +75,8 @@ public : //////////////////////////////////////////////////////////// /// \brief Get the current state of a joystick button (pressed or released) /// - /// \param joystick Index of the joystick to test (0 or 1) - /// \param button Index of the button to test + /// \param joystick Index of the joystick to test (in range [0 .. Joy::Count - 1]) + /// \param button Index of the button to test (in range [0 .. Joy::ButtonCount - 1]) /// /// \return True if button is down, false if button is up /// @@ -108,10 +108,10 @@ public : //////////////////////////////////////////////////////////// /// \brief Get the current position of a joystick axis /// - /// The returned position is in the range [-100, 100], except - /// the POV which is an angle and is thus defined in [0, 360]. + /// The returned position is in the range [-100 .. 100], except + /// the POV which is an angle and is thus defined in [0 .. 360]. /// - /// \param joystick Index of the joystick to test (0 or 1) + /// \param joystick Index of the joystick to test (in range [0 .. Joy::Count - 1]) /// \param axis Axis to test /// /// \return Current axis position