UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
joystickstatus.h
Go to the documentation of this file.
1 #ifndef UGDK_INPUT_JOYSTICKSTATUS_H_
2 #define UGDK_INPUT_JOYSTICKSTATUS_H_
3 
4 #include <ugdk/structure/types.h>
5 
6 namespace ugdk {
7 namespace input {
8 
9 class AxisStatus {
10  public:
12 
13  int16 raw() const;
14  int16 MaximumValue() const;
15  int16 MinimumValue() const;
16  double Percentage() const;
17 
18  private:
19  int16 raw_;
20 };
21 
22 class HatStatus {
23  public:
24  HatStatus(int raw);
25 
26  int raw() const;
27  bool IsCentered() const;
28  bool IsUp() const;
29  bool IsRight() const;
30  bool IsDown() const;
31  bool IsLeft() const;
32  bool IsRightUp() const;
33  bool IsRightDown() const;
34  bool IsLeftUp() const;
35  bool IsLeftDown() const;
36 
37  bool HasUp() const;
38  bool HasRight() const;
39  bool HasDown() const;
40  bool HasLeft() const;
41 
42  private:
43  int raw_;
44 };
45 
46 } // namespace input
47 } // namespace ugdk
48 
49 #endif // UGDK_INPUT_JOYSTICKSTATUS_H_
bool IsLeftUp() const
Definition: joystickstatus.h:22
Definition: animation.h:11
int16 MaximumValue() const
int16 MinimumValue() const
bool IsLeft() const
bool IsRightDown() const
double Percentage() const
bool HasRight() const
Definition: joystickstatus.h:9
int16_t int16
Definition: types.h:17
bool HasDown() const
bool HasLeft() const
bool IsDown() const
bool IsCentered() const
bool IsLeftDown() const
bool IsRightUp() const
bool IsRight() const