documentation for controllers

This commit is contained in:
arthur.jamet
2021-05-14 19:19:41 +02:00
parent 5e26cb4716
commit aafc9a80b7
3 changed files with 33 additions and 1 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ namespace Ray {
//! @param Button The keycode of the button
bool isUp(Button);
//! @brief Returns a vector containing keycode of currently pressed keys
//! @brief Fetch currently pressed buttons
//! @return Returns a vector containing keycode of currently pressed buttons
std::vector<GamePad::Button> getPressedButtons(void);
private:
+17
View File
@@ -17,11 +17,28 @@ namespace Ray {
public:
typedef ::KeyboardKey Key;
//! @return true if Key is pressed on the keyboard
//! @param Key The keycode of the key
static bool isPressed(Key);
//! @return true if Key is down on the keyboard
//! @param Key The keycode of the key
static bool isDown(Key);
//! @return true if Key is released on the keyboard
//! @param Key The keycode of the key
static bool isReleased(Key);
//! @return true if Key is up on the keyboard
//! @param Key The keycode of the key
static bool isUp(Key);
//! @brief Fetch currently pressed keys
//! @return a vector containing keycode of currently pressed keys
static std::vector<Keyboard::Key> getPressedKeys(void);
//! @brief Fetch currently pressed keys
//! @return a vector containing char of currently pressed keys
static std::vector<char> getPressedChars(void);
};
}
+14
View File
@@ -17,10 +17,24 @@ namespace Ray {
public:
typedef ::MouseButton Button;
//! @return true if Key is pressed on the keyboard
//! @param Key The keycode of the key
static bool isPressed(Button);
//! @return true if Key is down on the keyboard
//! @param Key The keycode of the key
static bool isDown(Button);
//! @return true if Key is released on the keyboard
//! @param Key The keycode of the key
static bool isReleased(Button);
//! @return true if Key is up on the keyboard
//! @param Key The keycode of the key
static bool isUp(Button);
//! @brief Fetch currently pressed buttons
//! @return a vector containing keycode of currently pressed buttons
static std::vector<Mouse::Button> getPressedButtons(void);
};
}