00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef SFML_JOYSTICK_HPP
00026 #define SFML_JOYSTICK_HPP
00027
00029
00031 #include <SFML/Config.hpp>
00032
00033
00034 namespace sf
00035 {
00040 class SFML_API Joystick
00041 {
00042 public :
00043
00048 enum
00049 {
00050 Count = 8,
00051 ButtonCount = 32,
00052 AxisCount = 8
00053 };
00054
00059 enum Axis
00060 {
00061 X,
00062 Y,
00063 Z,
00064 R,
00065 U,
00066 V,
00067 PovX,
00068 PovY
00069 };
00070
00079 static bool IsConnected(unsigned int joystick);
00080
00091 static unsigned int GetButtonCount(unsigned int joystick);
00092
00104 static bool HasAxis(unsigned int joystick, Axis axis);
00105
00117 static bool IsButtonPressed(unsigned int joystick, unsigned int button);
00118
00130 static float GetAxisPosition(unsigned int joystick, Axis axis);
00131
00141 static void Update();
00142 };
00143
00144 }
00145
00146
00147 #endif // SFML_JOYSTICK_HPP
00148
00149