You.i Engine
YiGamePadButton.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_GAME_PAD_BUTTON_H_
3 #define _YI_GAME_PAD_BUTTON_H_
4 
10 #include "framework/YiPredef.h"
11 
12 /*
13  \brief Contains the state data for a single button on a CYIGamePad.
14 
15  \details Information is provided on the current press state of a button.
16 */
18 {
19 friend class CYIGamePad;
20 friend class CYIGamePadPriv;
22 
23 public:
24  enum STATE
25  {
30  };
31 
32  /*
33  \details Returns true if the button is currently pressed.
34  */
35  bool IsPressed() const;
36 
37  /*
38  \details Returns the current state of the button.
39  */
40  STATE GetState() const;
41 
42 private:
43  const static int32_t REPEAT_THRESHOLD;
44  const static int32_t REPEAT_INITIAL_VALUE;
45 
47 
48  void Update(bool isPressed, bool bIsAutoRepeat = false);
49 
50  STATE m_state;
51  int32_t m_nRepeatValue;
52 };
53 
58 #endif // _YI_GAME_PAD_BUTTON_H_
Definition: YiGamePadExtendedButtons.h:20
STATE
Definition: YiGamePadButton.h:24
Definition: YiGamePadButton.h:26
Definition: YiGamePad.h:22
Definition: YiGamePadButton.h:17
friend class CYIGamePadPriv
Definition: YiGamePadButton.h:20
Definition: YiGamePadButton.h:29
STATE GetState() const
Definition: YiGamePadButton.h:27
Definition: YiGamePadButton.h:28
bool IsPressed() const